refactor(service): 重构物品、宠物和任务服务,统一使用EX模型和回调函数处理数据操作

This commit is contained in:
1
2025-09-23 15:01:52 +00:00
parent 1ee43e1319
commit 9c5cfa151a
12 changed files with 100 additions and 481 deletions

View File

@@ -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"`