refactor(service): 重构物品、宠物和任务服务,统一使用EX模型和回调函数处理数据操作
This commit is contained in:
@@ -10,8 +10,13 @@ const TableNamePlayerBagItem = "player_bag_item"
|
||||
type Item struct {
|
||||
*cool.Model
|
||||
PlayerID uint64 `gorm:"not null;index:idx_player_bag_item_by_player_id;comment:'所属玩家ID'" json:"player_id"`
|
||||
Data string `gorm:"type:text;not null;comment:'全部数据'" json:"data"`
|
||||
Data string ` gorm:"type:text;not null;comment:'全部数据'" json:"data"`
|
||||
}
|
||||
type ItemEX struct {
|
||||
Item
|
||||
Data map[uint32]SingleItemInfo `orm:"data" json:"data"`
|
||||
}
|
||||
|
||||
type SingleItemInfo struct {
|
||||
// 物品Id,
|
||||
ItemId uint32 `json:"itemId"`
|
||||
|
||||
Reference in New Issue
Block a user