package yb_comment_anonymous_user

import (
	"hongze/hongze_yb/global"
	"time"
)

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

// CreateBySql 通过sql创建记录
func CreateBySql(userId uint64, createTime time.Time) (err error) {
	sql := "INSERT INTO `yb_comment_anonymous_user` (`user_id`,`create_time`) VALUES (?,?)"
	err = global.DEFAULT_MYSQL.Exec(sql, userId, createTime).Error
	return
}
