Lee-WineList/model/param/login.go

28 lines
1.6 KiB
Go
Raw Permalink Normal View History

2023-04-24 17:19:41 +08:00
package param
2023-04-27 15:56:12 +08:00
import "Lee-WineList/common/constant"
2023-04-24 17:19:41 +08:00
// Login 用户登录入参
type Login struct {
2023-04-27 15:56:12 +08:00
Username string `json:"username" form:"username" binding:"required"` // 邮箱或手机号
Password string `json:"password" form:"password"` // 密码
TypeCode constant.LoginType `json:"type" form:"type" binding:"required"` // 登录方式,默认为空,可选值参见自定义类型
UserIdentity constant.UserIdentity `json:"identity" form:"identity" binding:"required"` // 用户身份,默认为空,可选值参见自定义类型
InviteCode string `json:"invite_code" form:"invite_code"` // 邀请码
NickName string `json:"nickName" form:"nickName"` // 微信昵称
AvatarUrl string `json:"avatarUrl" form:"avatarUrl"` // 微信头像
2023-04-24 17:19:41 +08:00
}
// RefreshToken 刷新Token入参
type RefreshToken struct {
RefreshToken string `json:"refresh_token" form:"refresh_token" binding:"required"` // 刷新Token
GrantType string `json:"grant_type" form:"grant_type" binding:"required"` // 授权类型,写refresh_token
}
// DecryptMobile 解密用户手机号入参
type DecryptMobile struct {
SessionKey string `json:"sessionKey" form:"sessionKey"` // sessionKey
EncryptedData string `json:"encryptedData" form:"encryptedData" binding:"required"` // 加密数据
Iv string `json:"iv" form:"iv" binding:"required"` // 加密算法的初始向量
}