merge all branch and change project structure

This commit is contained in:
Gordon
2021-11-10 15:24:59 +08:00
91 changed files with 3612 additions and 1225 deletions
@@ -1,9 +1,9 @@
package im_mysql_model
import (
"Open_IM/pkg/proto/group"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/proto/group"
"errors"
"time"
)
@@ -3,7 +3,7 @@ package im_mysql_model
import "time"
type User struct {
UID string `gorm:"column:uid"`
UID string `gorm:"column:uid;primaryKey;"`
Name string `gorm:"column:name"`
Icon string `gorm:"column:icon"`
Gender int32 `gorm:"column:gender"`
@@ -5,6 +5,7 @@ import (
"Open_IM/pkg/common/db"
pbAuth "Open_IM/pkg/proto/auth"
"Open_IM/pkg/utils"
"fmt"
_ "github.com/jinzhu/gorm/dialects/mysql"
"time"
)
@@ -18,7 +19,7 @@ func init() {
pb.Name = "AppManager" + utils.IntToString(k+1)
err := UserRegister(&pb)
if err != nil {
panic(err)
fmt.Println("AppManager insert error", err.Error())
}
}
}