feat: openid login
This commit is contained in:
@@ -1,20 +1,70 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
type Token struct {
|
||||
Token string `json:"token"`
|
||||
Refresh string `json:"refresh"`
|
||||
Info UserLoginSession `json:"info"`
|
||||
AccessToken string `json:"access_token"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
Info UserLoginSession `json:"info"`
|
||||
}
|
||||
|
||||
type UserLoginSession struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile string `json:"mobile"`
|
||||
Gender uint8 `json:"gender"`
|
||||
Birthday string `json:"birthday"`
|
||||
Status uint8 `json:"status"`
|
||||
LastTime utils.CustomTime `json:"last_time"`
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile string `json:"mobile"`
|
||||
Gender uint8 `json:"gender"`
|
||||
Birthday string `json:"birthday"`
|
||||
Type uint8 `json:"type"` // 1销售 2门店 3普通用户
|
||||
ClientCode string `json:"client_code"`
|
||||
SaleId int64 `json:"sale_id,omitempty"`
|
||||
StoreId int64 `json:"store_id,omitempty"`
|
||||
}
|
||||
|
||||
// ProfileData 当前登录用户详情(按 type 填充扩展字段)
|
||||
type ProfileData struct {
|
||||
Type uint8 `json:"type"`
|
||||
Base ProfileBase `json:"base"`
|
||||
Sale *ProfileSaleData `json:"sale,omitempty"`
|
||||
Store any `json:"store,omitempty"` // 门店详情暂未开放
|
||||
}
|
||||
|
||||
type ProfileBase struct {
|
||||
UserId int64 `json:"user_id"`
|
||||
Name string `json:"name"`
|
||||
Avatar string `json:"avatar"`
|
||||
Mobile string `json:"mobile"`
|
||||
Gender uint8 `json:"gender"`
|
||||
Birthday string `json:"birthday"`
|
||||
Status uint8 `json:"status"`
|
||||
}
|
||||
|
||||
type ProfileSaleData struct {
|
||||
Id int64 `json:"id"`
|
||||
SaleId int64 `json:"sale_id"`
|
||||
Name string `json:"name"`
|
||||
Mobile string `json:"mobile"`
|
||||
OriginMobile string `json:"origin_mobile"`
|
||||
Avatar string `json:"avatar"`
|
||||
Account string `json:"account"`
|
||||
Type uint32 `json:"type"`
|
||||
Sex uint32 `json:"sex"`
|
||||
BirthDate string `json:"birth_date"`
|
||||
Status uint32 `json:"status"`
|
||||
GroupId int64 `json:"group_id"`
|
||||
GroupName string `json:"group_name"`
|
||||
Address string `json:"address"`
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
CityId int64 `json:"city_id"`
|
||||
DistrictId int64 `json:"district_id"`
|
||||
TerritoryId int64 `json:"territory_id"`
|
||||
TerritoryName string `json:"territory_name"`
|
||||
Region *ProfileSaleRegion `json:"region,omitempty"`
|
||||
IdCardFront string `json:"id_card_front"`
|
||||
IdCardBack string `json:"id_card_back"`
|
||||
BusinessLicense string `json:"business_license"`
|
||||
}
|
||||
|
||||
type ProfileSaleRegion struct {
|
||||
Province string `json:"province"`
|
||||
City string `json:"city"`
|
||||
District string `json:"district"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user