mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Refactor code
This commit is contained in:
parent
fea89ad451
commit
d5b5929e9b
@ -10,6 +10,11 @@ type CommResp struct {
|
|||||||
ErrMsg string `json:"errMsg"`
|
ErrMsg string `json:"errMsg"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CommDataResp struct {
|
||||||
|
CommResp
|
||||||
|
Data []map[string]interface{} `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
type KickGroupMemberReq struct {
|
type KickGroupMemberReq struct {
|
||||||
GroupID string `json:"groupID" binding:"required"`
|
GroupID string `json:"groupID" binding:"required"`
|
||||||
KickedUserIDList []string `json:"kickedUserIDList" binding:"required"`
|
KickedUserIDList []string `json:"kickedUserIDList" binding:"required"`
|
||||||
|
@ -71,7 +71,7 @@ type Group struct {
|
|||||||
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
|
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
|
||||||
FaceUrl string `gorm:"column:face_url;size:255" json:"faceUrl"`
|
FaceUrl string `gorm:"column:face_url;size:255" json:"faceUrl"`
|
||||||
CreateTime time.Time `gorm:"column:create_time"`
|
CreateTime time.Time `gorm:"column:create_time"`
|
||||||
Ex string `gorm:"column:ex" json:"ex;size:1024"`
|
Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"`
|
||||||
Status int32 `gorm:"column:status"`
|
Status int32 `gorm:"column:status"`
|
||||||
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
|
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
|
||||||
GroupType int32 `gorm:"column:group_type"`
|
GroupType int32 `gorm:"column:group_type"`
|
||||||
|
@ -35,7 +35,7 @@ func initMysqlDB() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check the database and table during initialization
|
//Check the database and table during initialization
|
||||||
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName+"test1")
|
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName)
|
||||||
err = db.Exec(sql).Error
|
err = db.Exec(sql).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError("0", "Exec failed ", err.Error(), sql)
|
log.NewError("0", "Exec failed ", err.Error(), sql)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user