- 在 GlobalLimit 结构体中,将 State 字段的定义修改为包含默认值 true- 这样做可以确保在创建新记录时,State 字段
@@ -12,7 +12,7 @@ type GlobalLimit struct {
CdnUid int
GatewayGroupId int
Comment string
- State bool
+ State bool `gorm:"column:state" default:"true"`
ExpiredAt int64
createdAt time.Time
updatedAt time.Time