2024-06-03 14:40:50 +07:00
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
type Wallet struct {
|
2024-07-30 23:51:53 +07:00
|
|
|
ID int64 `gorm:"primaryKey;autoIncrement;column:id"`
|
|
|
|
|
PartnerID int64 `gorm:"type:int;not null;column:partner_id"`
|
|
|
|
|
Balance float64 `gorm:"type:decimal(18,2);not null;default:0.00;column:balance"`
|
|
|
|
|
AuthBalance float64 `gorm:"type:decimal(18,2);not null;default:0.00;column:auth_balance"`
|
|
|
|
|
Currency string `gorm:"type:varchar(3);not null;column:currency"`
|
|
|
|
|
Status string `gorm:"type:varchar(50);column:status"`
|
|
|
|
|
CreatedAt time.Time `gorm:"autoCreateTime;column:created_at"`
|
|
|
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime;column:updated_at"`
|
2024-06-03 14:40:50 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (Wallet) TableName() string {
|
|
|
|
|
return "wallets"
|
|
|
|
|
}
|
2024-07-31 23:02:15 +07:00
|
|
|
|
|
|
|
|
type WalletWithdrawRequest struct {
|
|
|
|
|
ID int64
|
|
|
|
|
Token string
|
|
|
|
|
PartnerID int64
|
|
|
|
|
Amount int64
|
|
|
|
|
Fee int64
|
|
|
|
|
Total int64
|
|
|
|
|
}
|