package system import ( "hongze/fms_api/global" "time" ) const ( ConfigKeyCrmPermissionFiccClassify = "crm_permission_ficc_classify" ) // SysConfig 系统配置 type SysConfig struct { ConfigId int `gorm:"primaryKey;column:config_id" json:"config_id" description:"配置ID"` ConfigCode string `gorm:"column:config_code" json:"config_code" description:"配置编码"` ConfigValue string `gorm:"column:config_value" json:"config_value" description:"配置值"` Remark string `gorm:"column:remark" json:"remark" description:"备注信息"` CreateTime time.Time `gorm:"column:create_time" json:"create_time" description:"创建时间"` } func (c *SysConfig) TableName() string { return "sys_config" } func (c *SysConfig) Update(updateCols []string) (err error) { err = global.DEFAULT_MYSQL.Model(c).Select(updateCols).Updates(c).Error return } func (c *SysConfig) FetchByCondition(condition string, pars []interface{}) (item *SysConfig, err error) { err = global.DEFAULT_MYSQL.Model(c). Where(condition, pars...). First(&item).Error return }