topfans/backend/pkg/models/system_config.go

17 lines
604 B
Go

package models
// SystemConfig 系统配置表模型
type SystemConfig struct {
ID int64 `gorm:"primaryKey;autoIncrement;column:id"`
ConfigKey string `gorm:"type:varchar(100);uniqueIndex;not null;column:config_key"`
ConfigValue int `gorm:"not null;column:config_value"`
Description string `gorm:"type:varchar(500);column:description"`
IsActive bool `gorm:"default:true;column:is_active"`
CreatedAt int64 `gorm:"column:created_at"`
UpdatedAt int64 `gorm:"column:updated_at"`
}
// TableName 指定表名
func (SystemConfig) TableName() string {
return "system_configs"
}