1
This commit is contained in:
parent
a6ab95f38f
commit
aa19d351cd
26
server/wheelserver/model/bag.go
Normal file
26
server/wheelserver/model/bag.go
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"f5"
|
||||||
|
"main/constant"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Bag struct {
|
||||||
|
Idx int64 `gorm:"column:idx;AUTO_INCREMENT"`
|
||||||
|
AccountId string `gorm:"column:account_id;primaryKey"`
|
||||||
|
ItemId int32 `gorm:"column:item_id"`
|
||||||
|
ItemNum int32 `gorm:"column:item_num"`
|
||||||
|
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
||||||
|
ModifyTime int32 `gorm:"column:modifytime"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Bag) TableName() string {
|
||||||
|
return "t_bag"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Bag) Create() error {
|
||||||
|
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Create(this); result.Error != nil {
|
||||||
|
return result.Error
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
27
server/wheelserver/model/buff.go
Normal file
27
server/wheelserver/model/buff.go
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"f5"
|
||||||
|
"main/constant"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Buff struct {
|
||||||
|
Idx int64 `gorm:"column:idx;AUTO_INCREMENT"`
|
||||||
|
AccountId string `gorm:"column:account_id;primaryKey"`
|
||||||
|
BuffId int32 `gorm:"column:buff_id"`
|
||||||
|
StartTime int32 `gorm:"column:start_time"`
|
||||||
|
EffectiveTime int32 `gorm:"column:effective_time"`
|
||||||
|
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
||||||
|
ModifyTime int32 `gorm:"column:modifytime"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Buff) TableName() string {
|
||||||
|
return "t_buff"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Buff) Create() error {
|
||||||
|
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Create(this); result.Error != nil {
|
||||||
|
return result.Error
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user