Documentation ¶
Index ¶
- Constants
- func FreezeAssets(db *xorm.Session, enable_transaction bool, user_id int64, symbol_id int, ...) (success bool, err error)
- func FreezeTotalAssets(db *xorm.Session, enable_transaction bool, user_id int64, symbol_id int, ...) (success bool, err error)
- func Init(db *xorm.Engine, rdc *redis.Client)
- func InitAssetsForDemo(uid int64, sid int, amount string, busid string)
- func QueryFreeze(db *xorm.Session, bid string) (*assetFreezeRecord, error)
- func Transfer(db *xorm.Session, enable_transaction bool, from, to int64, symbol_id int, ...) (success bool, err error)
- func UnfreezeAllAssets(db *xorm.Session, enable_transaction bool, user_id int64, business_id string) (success bool, err error)
- func UnfreezeAssets(db *xorm.Session, enable_transaction bool, user_id int64, ...) (success bool, err error)
- type Assets
- type FreezeStatus
- type OpBehavior
Constants ¶
View Source
const ( FreezeStatusNew FreezeStatus = 0 FreezeStatusDone FreezeStatus = 1 Behavior_Trade OpBehavior = "trade" Behavior_Recharge OpBehavior = "recharge" Behavior_Withdraw OpBehavior = "withdraw" Behavior_Transfer OpBehavior = "transfer" Behavior_DemoRecharge OpBehavior = "demo_recharge" )
View Source
const ( //根账户,所有的进出账都从这个账户开始,所有列的资产求和为0 系统金额才算对应的上 ROOTUSERID = 0 //系统收取手续费用放在该用户ID下 SystemFeeUserID = 1 )
Variables ¶
This section is empty.
Functions ¶
func FreezeAssets ¶
func FreezeTotalAssets ¶
func UnfreezeAllAssets ¶
Types ¶
type Assets ¶
type Assets struct { Id int64 `xorm:"pk autoincr bigint" json:"-"` UserId int64 `xorm:"notnull unique(userid_symbol)" json:"-"` SymbolId int `xorm:"notnull unique(userid_symbol)" json:"-"` Total string `xorm:"decimal(40,20) default(0) notnull" json:"total"` Freeze string `xorm:"decimal(40,20) default(0) notnull" json:"freeze"` Available string `xorm:"decimal(40,20) default(0) notnull" json:"available"` CreateTime time.Time `xorm:"timestamp created" json:"-"` UpdateTime time.Time `xorm:"timestamp updated" json:"update_time"` }
用户资产余额表
func UserAssets ¶
type OpBehavior ¶
type OpBehavior string
Click to show internal directories.
Click to hide internal directories.