mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
add Invitation Code
This commit is contained in:
parent
c9d7b63ef7
commit
78c807a514
@ -34,11 +34,12 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type paramsVerificationCode struct {
|
type paramsVerificationCode struct {
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
PhoneNumber string `json:"phoneNumber"`
|
PhoneNumber string `json:"phoneNumber"`
|
||||||
OperationID string `json:"operationID" binding:"required"`
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
UsedFor int `json:"usedFor"`
|
UsedFor int `json:"usedFor"`
|
||||||
AreaCode string `json:"areaCode"`
|
AreaCode string `json:"areaCode"`
|
||||||
|
InvitationCode string `json:"invitationCode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func SendVerificationCode(c *gin.Context) {
|
func SendVerificationCode(c *gin.Context) {
|
||||||
|
@ -30,6 +30,7 @@ type ParamsSetPassword struct {
|
|||||||
FaceURL string `json:"faceURL"`
|
FaceURL string `json:"faceURL"`
|
||||||
OperationID string `json:"operationID" binding:"required"`
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
AreaCode string `json:"areaCode"`
|
AreaCode string `json:"areaCode"`
|
||||||
|
InvitationCode string `json:"invitationCode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetPassword(c *gin.Context) {
|
func SetPassword(c *gin.Context) {
|
||||||
|
@ -3,11 +3,17 @@ package db
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type Register struct {
|
type Register struct {
|
||||||
Account string `gorm:"column:account;primary_key;type:char(255)" json:"account"`
|
Account string `gorm:"column:account;primary_key;type:char(255)" json:"account"`
|
||||||
Password string `gorm:"column:password;type:varchar(255)" json:"password"`
|
Password string `gorm:"column:password;type:varchar(255)" json:"password"`
|
||||||
Ex string `gorm:"column:ex;size:1024" json:"ex"`
|
Ex string `gorm:"column:ex;size:1024" json:"ex"`
|
||||||
UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
|
UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
|
||||||
AreaCode string `gorm:"column:area_code;type:varchar(255)"`
|
AreaCode string `gorm:"column:area_code;type:varchar(255)"`
|
||||||
|
InvitationCode string `gorm:"column:invitation_code;type:varchar(255)"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Invitation struct {
|
||||||
|
InvitationCode string `gorm:"column:invitation_code;primary_key;type:varchar(255)"`
|
||||||
|
CreateTime time.Time `gorm:"column:create_time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -78,7 +78,7 @@ func initMysqlDB() {
|
|||||||
&GroupMember{},
|
&GroupMember{},
|
||||||
&GroupRequest{},
|
&GroupRequest{},
|
||||||
&User{},
|
&User{},
|
||||||
&Black{}, &ChatLog{}, &Register{}, &Conversation{}, &AppVersion{}, &Department{}, &BlackList{}, &IpLimit{}, &UserIpLimit{})
|
&Black{}, &ChatLog{}, &Register{}, &Conversation{}, &AppVersion{}, &Department{}, &BlackList{}, &IpLimit{}, &UserIpLimit{}, &Invitation{})
|
||||||
db.Set("gorm:table_options", "CHARSET=utf8")
|
db.Set("gorm:table_options", "CHARSET=utf8")
|
||||||
db.Set("gorm:table_options", "collation=utf8_unicode_ci")
|
db.Set("gorm:table_options", "collation=utf8_unicode_ci")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user