Add Balance and Withdrawal

This commit is contained in:
aditya.siregar
2024-07-31 23:02:15 +07:00
parent 38003f84d1
commit 4c1a819365
19 changed files with 434 additions and 69 deletions
+18
View File
@@ -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
}
+10
View File
@@ -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
}
+1
View File
@@ -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"`
}
+9
View File
@@ -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
}