record.go 491 Bytes
Newer Older
hujiebin's avatar
hujiebin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
package group_m

import (
	"git.hilo.cn/hilo-common/domain"
	"git.hilo.cn/hilo-common/resource/mysql"
	"hilo-group/myerr"
)

func AddGroupKickRecord(model *domain.Model, imGroupId string, userId mysql.ID, beKickUserId mysql.ID) error {
	groupKickRecord := GroupKickRecord{
		Model:        model,
		ImGroupId:    imGroupId,
		UserId:       userId,
		BeKickUserId: beKickUserId,
	}
	if err := model.Db.Create(&groupKickRecord).Error; err != nil {
		return myerr.WrapErr(err)
	}
	return nil
}