package voice_broadcast_statistics

import "hongze/hongze_yb/global"

// AddBroadcastStatistics 新增记录
func (voiceBroadcastStatistics *VoiceBroadcastStatistics) AddBroadcastStatistics() (err error) {
	err = global.DEFAULT_MYSQL.Create(voiceBroadcastStatistics).Error
	return
}

func (l *VoiceBroadcastStatistics) GetById() (item *VoiceBroadcastStatistics, err error) {
	err = global.DEFAULT_MYSQL.Model(l).Where("id = ?", l.Id).First(&item).Error
	return
}

func (l *VoiceBroadcastStatistics) Update(updateCols []string) (err error) {
	err = global.DEFAULT_MYSQL.Model(l).Select(updateCols).Updates(*l).Error
	return
}
