mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-12-02 01:53:16 +00:00
re-construct oauth
This commit is contained in:
@@ -2,11 +2,18 @@ package model
|
||||
|
||||
type UserThird struct {
|
||||
IdModel
|
||||
UserId uint `json:"user_id" gorm:"not null;index"`
|
||||
OpenId string `json:"open_id" gorm:"not null;index"`
|
||||
UnionId string `json:"union_id" gorm:"not null;"`
|
||||
ThirdType string `json:"third_type" gorm:"not null;"`
|
||||
ThirdEmail string `json:"third_email"`
|
||||
ThirdName string `json:"third_name"`
|
||||
UserId uint ` json:"user_id" gorm:"not null;index"`
|
||||
OauthUser
|
||||
// UnionId string `json:"union_id" gorm:"not null;"`
|
||||
// OauthType string `json:"oauth_type" gorm:"not null;"`
|
||||
OauthType string `json:"oauth_type"`
|
||||
Op string `json:"op" gorm:"not null;"`
|
||||
TimeModel
|
||||
}
|
||||
|
||||
func (u *UserThird) FromOauthUser(userId uint, oauthUser *OauthUser, oauthType string, op string) {
|
||||
u.UserId = userId
|
||||
u.OauthUser = *oauthUser
|
||||
u.OauthType = oauthType
|
||||
u.Op = op
|
||||
}
|
||||
Reference in New Issue
Block a user