Files
jx-callback/business/model/auth2.go
2020-02-13 16:45:09 +08:00

39 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
const (
AuthBindStatusNormal = 1
AuthBindStatusDisabled = 2
)
const (
AdminName = "jxadmin"
AuthBindTypeAll = -1
AuthBindTypeAuth = 0 // 绑定类型为认证
AuthBindTypeID = 1 // 绑定类型为用户标识,不做为认证
)
type AuthBind struct {
ModelIDCULD
AuthID string `orm:"size(48);column(auth_id)" json:"authID"`
BindType int8 `json:"bindType"`
Type string `orm:"size(16)" json:"type"`
TypeID string `orm:"size(32);column(type_id)" json:"typeID"`
UserID string `orm:"size(48);column(user_id);index" 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:"-"`
Remark string `orm:"size(255)" json:"remark"`
DetailData string `orm:"type(text)" json:"detailData"`
}
func (*AuthBind) TableUnique() [][]string {
return [][]string{
// []string{"UserID", "Type", "DeletedAt"}, // 这个其实UserID是属性而不是key
[]string{"AuthID", "Type", "BindType", "DeletedAt"},
}
}