package yb

import "github.com/beego/beego/v2/client/orm"

type Config struct {
	ConfigValue     string   `description:"配置值"`
	ConfigCode      string   `description:"配置编码"`
}

func (c *Config) TableName() string {
	return "yb_config"
}
// GetConfigByCode 查询配置详情
func GetConfigByCode(configCode string) (item *Config, err error) {
	o := orm.NewOrm()
	sql := `SELECT * FROM yb_config  WHERE config_code= ?`
	err = o.Raw(sql, configCode).QueryRow(&item)
	return
}