package v1 import "github.com/gogf/gf/v2/frame/g" type LoginReq struct { g.Meta `path:"/auth/login" method:"post" tags:"User/Auth" summary:"User login"` LoginType string `json:"loginType" v:"required|in:wechat,mobile,password#login type required|unsupported login type"` Code string `json:"code"` Mobile string `json:"mobile"` VerifyCode string `json:"verifyCode"` Account string `json:"account"` Password string `json:"password"` Terminal string `json:"terminal" v:"required|in:mini,h5,app#terminal required|invalid terminal"` } type LoginRes struct { AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"` ExpiresIn int64 `json:"expiresIn"` UserID uint64 `json:"userId"` } type RefreshReq struct { g.Meta `path:"/auth/refresh" method:"post" tags:"User/Auth" summary:"Rotate user token"` RefreshToken string `json:"refreshToken" v:"required"` } type RefreshRes LoginRes