```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(config): 修改地图坑位配置的数据结构

- 将MapPit结构体中的MapID字段从数组类型[]int32改为单个int32类型
- 更新数据库标签,移除数组类型定义,添加非空约束和索引
- 修改JSON标签注释为"所属地图ID"
- 在服务层的查询操作中添加map_id字段的相等查询支持
```
This commit is contained in:
昔念
2026-02-24 19:20:38 +08:00
parent 0a2ec3af08
commit 8a072bd028
2 changed files with 2 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ type MapPit struct {
*BaseConfig
*Event
// 复用通用基础配置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"`
Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"`