package model type Setting struct { Base Code string `json:"code" gorm:"type:char(20);not null;index:idx_code; comment:'设定code'"` Data string `json:"render_data" gorm:"type:text;not null; comment:'值'"` Describe string `json:"describe" gorm:"type:text;default null;comment:'配置说明'"` } func (Setting) TableName() string { return "t_setting" }