40 lines
1.6 KiB
Go
40 lines
1.6 KiB
Go
package system
|
|
|
|
import (
|
|
"f5"
|
|
"q5"
|
|
)
|
|
|
|
// 背包物品
|
|
type BagItem struct {
|
|
Idx int64 `json:"idx"`
|
|
Token_id string `gorm:"uniqueIndex;comment:token_id" json:"token_id"`
|
|
Account_id string `gorm:"comment:用户id" json:"account_id"`
|
|
Item_id int `gorm:"comment:物品id" json:"item_id"`
|
|
Item_num int `gorm:"comment:物品数量" json:"item_num"`
|
|
Rand_attr string `gorm:"comment:随机属性" json:"rand_attr"`
|
|
Today_get_gold int64 `gorm:"comment:今日获得金币" json:"today_get_gold"`
|
|
Last_get_gold_time int `gorm:"comment:最后获得金币时间" json:"last_get_gold_time"`
|
|
Createtime int `gorm:"comment:创建时间" json:"createtime"`
|
|
Modifytime int `gorm:"comment:修改时间" json:"modifytime"`
|
|
Is_old int `gorm:"comment:0:展示红点 1:不用展示" json:"is_old"`
|
|
}
|
|
|
|
func (this *BagItem) TableName() string {
|
|
return "t_bag"
|
|
}
|
|
|
|
func (this *BagItem) LoadFromDs(ds *f5.DataSet) {
|
|
this.Idx = q5.ToInt64(ds.GetByName("idx"))
|
|
this.Token_id = ds.GetByName("token_id")
|
|
this.Account_id = ds.GetByName("account_id")
|
|
this.Item_id = q5.ToInt(ds.GetByName("item_id"))
|
|
this.Item_num = q5.ToInt(ds.GetByName("item_num"))
|
|
this.Rand_attr = ds.GetByName("rand_attr")
|
|
this.Today_get_gold = q5.ToInt64(ds.GetByName("today_get_gold"))
|
|
this.Last_get_gold_time = q5.ToInt(ds.GetByName("last_get_gold_time"))
|
|
this.Createtime = q5.ToInt(ds.GetByName("createtime"))
|
|
this.Modifytime = q5.ToInt(ds.GetByName("modifytime"))
|
|
this.Is_old = q5.ToInt(ds.GetByName("is_old"))
|
|
}
|