package models import "time" // AppConfig 应用配置模型 type AppConfig struct { ID uint `gorm:"primaryKey" json:"id"` Key string `gorm:"type:varchar(50);uniqueIndex;not null" json:"key"` Value string `gorm:"type:text;not null" json:"value"` Description string `gorm:"type:varchar(200)" json:"description"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } // TableName 指定表名 func (AppConfig) TableName() string { return "app_config" }