代码初始化
This commit is contained in:
36
model/entity/wallet/wallet.go
Normal file
36
model/entity/wallet/wallet.go
Normal file
@@ -0,0 +1,36 @@
|
||||
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:"乐观锁版本号"`
|
||||
}
|
||||
Reference in New Issue
Block a user