49 lines
1.9 KiB
Go
49 lines
1.9 KiB
Go
package system
|
|
|
|
import (
|
|
"f5"
|
|
"q5"
|
|
)
|
|
|
|
type Sale struct {
|
|
Idx int64 `json:"idx"`
|
|
Order_id string `gorm:"uniqueIndex;comment:订单id" json:"order_id"`
|
|
Chain string `gorm:"comment:chain" json:"chain"`
|
|
Net_id int64 `gorm:"comment:net_id" json:"net_id"`
|
|
Token_id string `gorm:"comment:token_id" json:"token_id"`
|
|
Contract_address string `gorm:"comment:contract_address" json:"contract_address"`
|
|
Buyer string `gorm:"comment:buyer" json:"buyer"`
|
|
Seller string `gorm:"comment:seller" json:"seller"`
|
|
Item_id int `gorm:"comment:item_id" json:"item_id"`
|
|
Hero_quality int `gorm:"comment:hero_quality" json:"hero_quality"`
|
|
Price string `gorm:"comment:price" json:"price"`
|
|
Indexed_at int `gorm:"comment:indexed_at" json:"indexed_at"`
|
|
Event_id string `gorm:"comment:事件id" json:"event_id"`
|
|
Event_data string `gorm:"comment:事件内容" json:"event_data"`
|
|
Createtime int `gorm:"comment:创建时间" json:"createtime"`
|
|
Modifytime int `gorm:"comment:修改时间" json:"modifytime"`
|
|
}
|
|
|
|
func (this *Sale) TableName() string {
|
|
return "t_sale"
|
|
}
|
|
|
|
func (this *Sale) LoadFromDs(ds *f5.DataSet) {
|
|
this.Idx = q5.ToInt64(ds.GetByName("idx"))
|
|
this.Order_id = ds.GetByName("order_id")
|
|
this.Chain = ds.GetByName("chain")
|
|
this.Net_id = q5.ToInt64(ds.GetByName("net_id"))
|
|
this.Token_id = ds.GetByName("token_id")
|
|
this.Contract_address = ds.GetByName("contract_address")
|
|
this.Buyer = ds.GetByName("buyer")
|
|
this.Seller = ds.GetByName("seller")
|
|
this.Item_id = q5.ToInt(ds.GetByName("item_id"))
|
|
this.Hero_quality = q5.ToInt(ds.GetByName("hero_quality"))
|
|
this.Price = ds.GetByName("price")
|
|
this.Indexed_at = q5.ToInt(ds.GetByName("indexed_at"))
|
|
this.Event_id = ds.GetByName("event_id")
|
|
this.Event_data = ds.GetByName("event_data")
|
|
this.Createtime = q5.ToInt(ds.GetByName("createtime"))
|
|
this.Modifytime = q5.ToInt(ds.GetByName("modifytime"))
|
|
}
|