- 重构了dao.GetAuthBind和dao.GetUserBindAuthInfo
- AuthBind的唯一索引调整为"AuthID", "Type", "BindType", "DeletedAt"
This commit is contained in:
@@ -16,12 +16,12 @@ const (
|
||||
type AuthBind struct {
|
||||
ModelIDCULD
|
||||
|
||||
UserID string `orm:"size(48);column(user_id)" json:"userID"`
|
||||
AuthID string `orm:"size(48);column(auth_id)" json:"authID"`
|
||||
BindType int8 `json:"bindType"`
|
||||
Type string `orm:"size(16)" json:"type"`
|
||||
Status int8 `json:"status"`
|
||||
|
||||
AuthID string `orm:"size(48);column(auth_id)" json:"authID"`
|
||||
UserID string `orm:"size(48);column(user_id)" json:"userID"`
|
||||
Status int8 `json:"status"`
|
||||
AuthID2 string `orm:"size(48);column(auth_id2);index" json:"authID2"`
|
||||
AuthSecret string `orm:"size(48)" json:"-"`
|
||||
AuthSecret2 string `orm:"size(48)" json:"-"`
|
||||
@@ -31,7 +31,7 @@ type AuthBind struct {
|
||||
|
||||
func (*AuthBind) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"UserID", "Type", "DeletedAt"},
|
||||
[]string{"AuthID", "Type", "DeletedAt"},
|
||||
// []string{"UserID", "Type", "DeletedAt"}, // 这个其实UserID是属性,而不是key
|
||||
[]string{"AuthID", "Type", "BindType", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user