feat(config): 修改地图坑位配置的数据结构 - 将MapPit结构体中的MapID字段从数组类型[]int32改为单个int32类型 - 更新数据库标签,移除数组类型定义,添加非空约束和索引 - 修改JSON标签注释为"所属地图ID" - 在服务层的查询操作中添加map_id字段的相等查询支持 ```
This commit is contained in:
@@ -24,7 +24,7 @@ type MapPit struct {
|
|||||||
*BaseConfig
|
*BaseConfig
|
||||||
*Event
|
*Event
|
||||||
// 复用通用基础配置(ID/创建时间/更新时间等)
|
// 复用通用基础配置(ID/创建时间/更新时间等)
|
||||||
MapID []int32 `gorm:"type:int[];comment:'绑定地图地图ID'" json:"map_id"`
|
MapID int32 `gorm:"not null;index;comment:'所属地图ID'" json:"map_id" description:"地图ID"`
|
||||||
|
|
||||||
RefreshID []int `gorm:"type:int[];comment:'精灵ID列表'" json:"refresh_id"`
|
RefreshID []int `gorm:"type:int[];comment:'精灵ID列表'" json:"refresh_id"`
|
||||||
Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"`
|
Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"`
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ func NewMapPitService() *MapPitService {
|
|||||||
Model: model.NewMapPit(),
|
Model: model.NewMapPit(),
|
||||||
PageQueryOp: &cool.QueryOp{
|
PageQueryOp: &cool.QueryOp{
|
||||||
KeyWordField: []string{"remake"},
|
KeyWordField: []string{"remake"},
|
||||||
|
FieldEQ: []string{"map_id"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user