This commit is contained in:
aozhiwei 2024-11-13 10:55:59 +08:00
parent c65346af31
commit 8f5d2e5a8f
2 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ func (this *ShopApi) Buy(c *gin.Context) {
chip.AccountId = s.GetAccountId()
chip.ItemId = itemMeta.GetId()
chip.ItemNum = 1
chip.ExpireTime = int32(nowTime)
chip.CreateTime = int32(nowTime)
chip.ModifyTime = int32(nowTime)
if chip.Create() != nil {

View File

@ -10,6 +10,7 @@ type Chip struct {
AccountId string `gorm:"column:account_id;primaryKey"`
ItemId int32 `gorm:"column:item_id"`
ItemNum int32 `gorm:"column:item_num"`
ExpireTime int32 `gorm:"column:expiretime;<-:create"`
CreateTime int32 `gorm:"column:createtime;<-:create"`
ModifyTime int32 `gorm:"column:modifytime"`
}