package chart_info_correlation

import "hongze/hongze_yb/global"

// GetItemById 主键获取
func (m *ChartInfoCorrelation) GetItemById(primaryId int) (err error) {
	err = global.MYSQL["data"].Model(m).
		Where("correlation_chart_info_id = ?", primaryId).
		First(&m).Error
	return
}

func (m *ChartInfoCorrelation) Update(updateCols []string) (err error) {
	err = global.MYSQL["data"].Model(m).Select(updateCols).Updates(*m).Error
	return
}
