28 lines
834 B
Go
28 lines
834 B
Go
package entity
|
|
|
|
import "time"
|
|
|
|
type Wallet struct {
|
|
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"`
|
|
}
|
|
|
|
func (Wallet) TableName() string {
|
|
return "wallets"
|
|
}
|
|
|
|
type WalletWithdrawRequest struct {
|
|
ID int64
|
|
Token string
|
|
PartnerID int64
|
|
Amount int64
|
|
Fee int64
|
|
Total int64
|
|
}
|