- first edition of auth2
This commit is contained in:
30
business/model/auth2.go
Normal file
30
business/model/auth2.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
AuthBindStatusNormal = 1
|
||||
AuthBindStatusDisabled = 2
|
||||
)
|
||||
|
||||
type AuthBind struct {
|
||||
ModelIDCULD
|
||||
|
||||
UserID string `orm:"size(48);column(user_id)" json:"userID"`
|
||||
Type string `orm:"size(16)" json:"type"`
|
||||
Status int8 `json:"status"`
|
||||
|
||||
AuthID string `orm:"size(48);index" json:"authID"`
|
||||
AuthID2 string `orm:"size(48);index" json:"authID2"`
|
||||
AuthSecret string `orm:"size(48)" json:"authSecret"`
|
||||
AuthSecret2 string `orm:"size(48)" json:"authSecret2"`
|
||||
Remark string `orm:"size(255)" json:"remark"`
|
||||
DetailData string `orm:"type(text)" json:"-"`
|
||||
|
||||
UserData interface{} `orm:"-" json:"-"`
|
||||
}
|
||||
|
||||
func (*AuthBind) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"UserID", "Type", "DeletedAt"},
|
||||
[]string{"AuthID", "Type", "DeletedAt"},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user