package yb_community_audio_listen_log

import "hongze/hongze_yb/global"

func (l *YbCommunityAudioListenLog) Create() (err error) {
	err = global.DEFAULT_MYSQL.Create(l).Error
	return
}

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

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