This commit is contained in:
@@ -27,6 +27,7 @@ type Pet struct {
|
||||
PlayerID uint32 `gorm:"not null;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
|
||||
Free int `gorm:"not null;default:0;comment:'是否放生'" json:"free"` //"0为放入仓库,1为放生,2为上架
|
||||
CatchTime uint32 `gorm:"not null;comment:'捕捉时间'" json:"catch_time"` //唯一键
|
||||
IsShow int `gorm:"not null;default:0;comment:'是否基地展示'" json:"is_show"` //1=基地展示 0=未展示
|
||||
|
||||
SalePrice uint32 `gorm:"not null;default:0;comment:'出售价格'" json:"sale_price"`
|
||||
SaleCount uint32 `gorm:"not null;default:0;comment:'出售次数'" json:"sale_count"`
|
||||
|
||||
@@ -22,9 +22,9 @@ type BaseHouse struct {
|
||||
// 基础关联字段
|
||||
PlayerID uint64 `gorm:"not null;index:idx_player_house;comment:'所属玩家ID'" json:"player_id"`
|
||||
|
||||
// 核心业务字段
|
||||
// ShowPokemon 基地展示精灵ID列表(支持展示多个精灵)
|
||||
ShowPokemon []uint32 `gorm:"type:jsonb;default:'[]';comment:'基地展示精灵ID列表'" json:"show_pokemon"`
|
||||
// // 核心业务字段
|
||||
// // ShowPokemon 基地展示精灵ID列表(支持展示多个精灵)
|
||||
// ShowPokemon []uint32 `gorm:"type:jsonb;default:'[]';comment:'基地展示精灵ID列表'" json:"show_pokemon"`
|
||||
|
||||
UsedItems string `gorm:"type:jsonb;default:'{}';comment:'用户物品列表(物品ID:数量)'" json:"used_items"`
|
||||
|
||||
@@ -57,11 +57,6 @@ type FitmentShowInfo struct {
|
||||
Status uint32 `json:"status"`
|
||||
}
|
||||
|
||||
// UpdateShowPokemon 更新基地展示精灵列表
|
||||
func (bh *BaseHouse) UpdateShowPokemon(pokemonIDs []uint32) {
|
||||
bh.ShowPokemon = pokemonIDs
|
||||
}
|
||||
|
||||
// --------------- 初始化创建表 ---------------
|
||||
func init() {
|
||||
// 初始化时创建基地房型表(与现有Talk表初始化逻辑一致)
|
||||
|
||||
Reference in New Issue
Block a user