57 lines
2.7 KiB
Go
57 lines
2.7 KiB
Go
package system
|
||
|
||
import (
|
||
"f5"
|
||
"q5"
|
||
)
|
||
|
||
type GoldBullion struct {
|
||
Idx int64 `json:"idx"`
|
||
Src_account_id string `gorm:"comment:账号id(channel + '_' + gameid + '_' + openid)" json:"src_account_id"`
|
||
Src_address string `gorm:"comment:src_address" json:"src_address"`
|
||
Token_id string `gorm:"uniqueIndex;comment:token_id" json:"token_id"`
|
||
Net_id int `gorm:"comment:net_id" json:"net_id"`
|
||
Item_id int `gorm:"comment:道具id" json:"item_id"`
|
||
Gold int `gorm:"comment:金币" json:"gold"`
|
||
Status int `gorm:"comment:状态 0:初始 1:已开" json:"status"`
|
||
Open_status int `gorm:"comment:1: 已发送 2:未发送 3:已领取" json:"open_status"`
|
||
Open_address string `gorm:"comment:open_address" json:"open_address"`
|
||
Open_time int `gorm:"comment:open_time" json:"open_time"`
|
||
Open_account_id string `gorm:"comment:open账号id(channel + '_' + gameid + '_' + openid)" json:"open_account_id"`
|
||
Open_uniqid string `gorm:"comment:开启的本次唯一id" json:"open_uniqid"`
|
||
Returned int `gorm:"comment:是否已超时返还" json:"returned"`
|
||
Return_time int `gorm:"comment:返还时间" json:"return_time"`
|
||
Activated int `gorm:"comment:是否已上链" json:"activated"`
|
||
Activated_time int `gorm:"comment:上链时间" json:"activated_time"`
|
||
Createtime int `gorm:"comment:创建时间" json:"createtime"`
|
||
Modifytime int `gorm:"comment:修改时间" json:"modifytime"`
|
||
Return_status int `gorm:"comment:1: 已发送 2:已领取" json:"return_status"`
|
||
}
|
||
|
||
func (gb *GoldBullion) TableName() string {
|
||
return "t_gold_bullion"
|
||
}
|
||
|
||
func (gb *GoldBullion) LoadFromDs(ds *f5.DataSet) {
|
||
gb.Idx = q5.ToInt64(ds.GetByName("idx"))
|
||
gb.Src_account_id = ds.GetByName("src_account_id")
|
||
gb.Src_address = ds.GetByName("src_address")
|
||
gb.Token_id = ds.GetByName("token_id")
|
||
gb.Net_id = q5.ToInt(ds.GetByName("net_id"))
|
||
gb.Item_id = q5.ToInt(ds.GetByName("item_id"))
|
||
gb.Gold = q5.ToInt(ds.GetByName("gold"))
|
||
gb.Status = q5.ToInt(ds.GetByName("status"))
|
||
gb.Open_status = q5.ToInt(ds.GetByName("open_status"))
|
||
gb.Open_address = ds.GetByName("open_address")
|
||
gb.Open_time = q5.ToInt(ds.GetByName("open_time"))
|
||
gb.Open_account_id = ds.GetByName("open_account_id")
|
||
gb.Open_uniqid = ds.GetByName("open_uniqid")
|
||
gb.Returned = q5.ToInt(ds.GetByName("returned"))
|
||
gb.Return_time = q5.ToInt(ds.GetByName("return_time"))
|
||
gb.Activated = q5.ToInt(ds.GetByName("activated"))
|
||
gb.Activated_time = q5.ToInt(ds.GetByName("activated_time"))
|
||
gb.Createtime = q5.ToInt(ds.GetByName("createtime"))
|
||
gb.Modifytime = q5.ToInt(ds.GetByName("modifytime"))
|
||
gb.Return_status = q5.ToInt(ds.GetByName("return_status"))
|
||
}
|