package group_m import ( "git.hilo.cn/hilo-common/domain" "git.hilo.cn/hilo-common/resource/mysql" ) type GroupUserLimits struct { mysql.Entity UserId uint64 MaxJoin uint } func (guLimit *GroupUserLimits) Set(model *domain.Model) error { return model.Db.Where(guLimit).Create(guLimit).Error } func (guLimit *GroupUserLimits) Get(model *domain.Model) error { return model.Db.Where(guLimit).First(guLimit).Error } func (guLimit *GroupUserLimits) Delete(model *domain.Model) error { return model.Db.Where(guLimit).Delete(&GroupUserLimits{}).Error }