notification

This commit is contained in:
wenxu12345
2021-12-24 15:02:47 +08:00
parent d40e1e47fd
commit e64bc40ca9
11 changed files with 967 additions and 771 deletions
-12
View File
@@ -91,18 +91,6 @@ func initMysqlDB() {
panic(err.Error())
}
sqlTable = "CREATE TABLE IF NOT EXISTS `black_list` (" +
" `uid` varchar(32) NOT NULL COMMENT 'uid'," +
" `begin_disable_time` datetime DEFAULT NULL," +
" `end_disable_time` datetime DEFAULT NULL," +
" `ex` varchar(1024) DEFAULT NULL," +
" PRIMARY KEY (`uid`) USING BTREE" +
" ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;"
err = db.Exec(sqlTable).Error
if err != nil {
panic(err.Error())
}
sqlTable = "CREATE TABLE IF NOT EXISTS `user_black_list` (" +
" `owner_id` varchar(64) NOT NULL," +
" `block_id` varchar(64) NOT NULL," +
@@ -15,7 +15,7 @@ func InsertIntoGroup(groupId, name, introduction, notification, faceUrl, ex stri
}
//Default group name
if name == "" {
name = "groupChat"
name = "Group Chat"
}
toInsertInfo := Group{GroupID: groupId, GroupName: name, Introduction: introduction, Notification: notification, FaceUrl: faceUrl, CreateTime: time.Now(), Ex: ex}
err = dbConn.Table("group").Create(toInsertInfo).Error