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

@@ -15,7 +15,7 @@ type CDKConfig struct {
*cool.Model
// 核心字段
CDKCode string `gorm:"not null;size:16;uniqueIndex:idx_config_gift_cdk_cdk_code,where:deleted_at IS NULL;comment:'CDK编号唯一标识用于玩家兑换'" json:"cdk_code" description:"CDK编号"`
CDKCode string `gorm:"not null;size:16;comment:'CDK编号唯一标识用于玩家兑换'" json:"cdk_code" description:"CDK编号"`
Type uint32 `gorm:"column:type;not null;default:0;comment:'CDK类型:0普通奖励,1服务器冠名'" json:"type" description:"CDK类型"`
//cdk可兑换次数where不等于0