package yb_community_video_play_log

import "hongze/hongze_yb/global"

func (item *YbCommunityVideoPlayLog) Create() (err error) {
	err = global.DEFAULT_MYSQL.Create(item).Error
	return
}

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

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