12345678910111213141516171819202122 |
- package yb_config
- import "hongze/hongze_yb/global"
- func (m *YbConfig) Create() (err error) {
- err = global.DEFAULT_MYSQL.Create(m).Error
- return
- }
- func (m *YbConfig) Update(cols string) (err error) {
- err = global.DEFAULT_MYSQL.Model(m).Select(cols).Updates(*m).Error
- return
- }
- func (m *YbConfig) Delete() (err error) {
- return
- }
- func (m *YbConfig) Fetch(condition string, pars []interface{}) (item *YbConfig, err error) {
- err = global.DEFAULT_MYSQL.Model(m).Where(condition, pars).First(&item).Error
- return
- }
|