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

@@ -12,9 +12,9 @@ const (
// SignIn 签到阶段配置表。
type SignIn struct {
*BaseConfig
SignType uint32 `gorm:"not null;default:1;uniqueIndex:idx_sign_type_stage,where:deleted_at IS NULL;comment:'签到类别1-累计 2-连续)'" json:"sign_type"`
StageDays uint32 `gorm:"not null;default:1;uniqueIndex:idx_sign_type_stage,where:deleted_at IS NULL;comment:'签到阶段天数0/1/3/7/14/30'" json:"stage_days"`
CdkID uint32 `gorm:"not null;uniqueIndex:idx_config_sign_in_cdk_id,where:deleted_at IS NULL;comment:'绑定的CDK配置ID'" json:"cdk_id"`
SignType uint32 `gorm:"not null;default:1;comment:'签到类别1-累计 2-连续)'" json:"sign_type"`
StageDays uint32 `gorm:"not null;default:1;comment:'签到阶段天数0/1/3/7/14/30'" json:"stage_days"`
CdkID uint32 `gorm:"not null;comment:'绑定的CDK配置ID'" json:"cdk_id"`
}
func (*SignIn) TableName() string {