diff --git a/server/wheelserver/model/bag.go b/server/wheelserver/model/bag.go new file mode 100644 index 00000000..78f18943 --- /dev/null +++ b/server/wheelserver/model/bag.go @@ -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 +} diff --git a/server/wheelserver/model/buff.go b/server/wheelserver/model/buff.go new file mode 100644 index 00000000..911ff5b0 --- /dev/null +++ b/server/wheelserver/model/buff.go @@ -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 +}