From 29c1bb86d8d280caa50a2f2cc43e92dbf019cafd Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Fri, 13 Jan 2023 14:35:58 +0800 Subject: [PATCH] Error code standardization --- .../db/mysql_model/im_mysql_model/user_model.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 1d494afae..21d68d003 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -5,9 +5,21 @@ import ( "Open_IM/pkg/utils" "errors" "fmt" + "gorm.io/gorm" "time" ) +var ( + BlackListDB *gorm.DB + UserDB *gorm.DB +) + +type BlackList struct { + UserId string `gorm:"column:uid"` + BeginDisableTime time.Time `gorm:"column:begin_disable_time"` + EndDisableTime time.Time `gorm:"column:end_disable_time"` +} + func UserRegister(user User) error { user.CreateTime = time.Now() if user.AppMangerLevel == 0 {