refactor: 移除模型中的 uniqueIndex 约束

This commit is contained in:
xinian
2026-04-27 00:54:18 +08:00
parent f97275cb54
commit ec1855dfac
13 changed files with 29 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ const (
type BaseTowerConfig struct {
*BaseConfig
Name string `gorm:"type:varchar(100);default:'';comment:'name'" json:"name" description:"name"`
TowerLevel uint32 `gorm:"not null;default:0;uniqueIndex:,where:deleted_at IS NULL;comment:'tower level'" json:"tower_level"`
TowerLevel uint32 `gorm:"not null;default:0;comment:'tower level'" json:"tower_level"`
BossIds []uint32 `gorm:"type:jsonb;comment:'boss ids'" json:"boss_ids"`
}