Files
jx-callback/business/model/auth2.go
gazebo dad8adc4bf + AuthBind中添加BindType
- 合并函数GetAuthBindsByAuthID2
- User中的mobile与email改为可为null
2019-09-03 15:35:54 +08:00

38 lines
975 B
Go

package model
const (
AuthBindStatusNormal = 1
AuthBindStatusDisabled = 2
)
const (
AdminName = "jxadmin"
AuthBindTypeAll = -1
AuthBindTypeAuth = 0 // 绑定类型为认证
AuthBindTypeID = 1 // 绑定类型为用户标识,不做为认证
)
type AuthBind struct {
ModelIDCULD
UserID string `orm:"size(48);column(user_id)" json:"userID"`
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"`
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"},
[]string{"AuthID", "Type", "DeletedAt"},
}
}