Add Balance and Withdrawal
This commit is contained in:
@@ -5,3 +5,21 @@ type Balance struct {
|
||||
Balance float64
|
||||
AuthBalance float64
|
||||
}
|
||||
|
||||
type BalanceWithdrawInquiry struct {
|
||||
PartnerID int64
|
||||
Amount int64
|
||||
}
|
||||
|
||||
type BalanceWithdrawInquiryResponse struct {
|
||||
PartnerID int64
|
||||
Amount int64
|
||||
Total int64
|
||||
Fee int64
|
||||
Token string
|
||||
}
|
||||
|
||||
type WalletWithdrawResponse struct {
|
||||
TransactionID string
|
||||
Status string
|
||||
}
|
||||
|
||||
@@ -18,3 +18,13 @@ type JWTOrderClaims struct {
|
||||
OrderID int64 `json:"order_id"`
|
||||
jwt.StandardClaims
|
||||
}
|
||||
|
||||
type JWTWithdrawClaims struct {
|
||||
ID int64 `json:"id"`
|
||||
PartnerID int64 `json:"partner_id"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
Amount int64 `json:"amount"`
|
||||
Fee int64 `json:"fee"`
|
||||
Total int64 `json:"total"`
|
||||
jwt.StandardClaims
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ type Transaction struct {
|
||||
Status string `gorm:"size:255"`
|
||||
CreatedBy int64 `gorm:"not null"`
|
||||
UpdatedBy int64 `gorm:"not null"`
|
||||
Amount float64 `gorm:"not null"`
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
}
|
||||
|
||||
@@ -16,3 +16,12 @@ type Wallet struct {
|
||||
func (Wallet) TableName() string {
|
||||
return "wallets"
|
||||
}
|
||||
|
||||
type WalletWithdrawRequest struct {
|
||||
ID int64
|
||||
Token string
|
||||
PartnerID int64
|
||||
Amount int64
|
||||
Fee int64
|
||||
Total int64
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user