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

This commit is contained in:
昔念
2026-02-14 09:45:25 +08:00
parent 50fd54c6d9
commit 0e3269b97e
3 changed files with 19 additions and 10 deletions

View File

@@ -2,6 +2,8 @@ package model
import (
"blazing/cool"
"github.com/gogf/gf/v2/os/gtime"
)
const (
@@ -9,9 +11,12 @@ const (
)
type BaseConfig struct {
*cool.Model // 保留通用ModelID/创建时间/更新时间等)
IsEnable int32 `gorm:"not null;default:0;comment:'是否启用1:启用0:禁用)'" json:"is_enable"` // 保留原有逻辑
Remark string `gorm:"type:varchar(255);default:'';comment:'性别配置备注(如:默认性别规则)'" json:"remark"` // 调整注释
ID uint `gorm:"primaryKey" json:"id"`
CreateTime *gtime.Time ` gorm:"column:createTime;not null;index,priority:1;autoCreateTime:nano;comment:创建时间" json:"createTime"` // 创建时间
UpdateTime *gtime.Time `orm:"autoUpdateTime=true" gorm:"column:updateTime;not null;index,priority:1;autoUpdateTime:nano;comment:更新时间" json:"updateTime"` // 更新时间
DeletedAt *gtime.Time `gorm:"index" json:"deletedAt"`
IsEnable int32 `gorm:"not null;default:0;comment:'是否启用1:启用0:禁用)'" json:"is_enable"` // 保留原有逻辑
Remark string `gorm:"type:varchar(255);default:'';comment:'性别配置备注(如:默认性别规则)'" json:"remark"` // 调整注释
}
func (m *BaseConfig) TableName() string {
@@ -24,9 +29,7 @@ func (m *BaseConfig) GroupName() string {
}
func NewBaseConfig() *BaseConfig {
return &BaseConfig{
Model: cool.NewModel(),
}
return &BaseConfig{}
}
// Egg 性别配置模型(替换原宠物融合配方模型)