37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
|
|
package entity
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
walletConsts "shop-user-trade/consts/wallet"
|
|||
|
|
|
|||
|
|
"gitea.com/red-future/common/beans"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
type walletCol struct {
|
|||
|
|
beans.SQLBaseCol
|
|||
|
|
UserID string
|
|||
|
|
Balance string
|
|||
|
|
Currency string
|
|||
|
|
Status string
|
|||
|
|
Version string
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var WalletCol = walletCol{
|
|||
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|||
|
|
UserID: "user_id",
|
|||
|
|
Balance: "balance",
|
|||
|
|
Currency: "currency",
|
|||
|
|
Status: "status",
|
|||
|
|
Version: "version",
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Wallet 钱包实体
|
|||
|
|
type Wallet struct {
|
|||
|
|
beans.SQLBaseDO `orm:",inherit"`
|
|||
|
|
|
|||
|
|
UserID int64 `orm:"user_id" json:"userId,string" description:"用户ID"`
|
|||
|
|
Balance int64 `orm:"balance" json:"balance" description:"余额(分)"`
|
|||
|
|
Currency string `orm:"currency" json:"currency" description:"货币类型:CNY-人民币"`
|
|||
|
|
Status walletConsts.WalletStatus `orm:"status" json:"status" description:"状态:1启用/0禁用/-1冻结"`
|
|||
|
|
Version int64 `orm:"version" json:"version" description:"乐观锁版本号"`
|
|||
|
|
}
|