chore: init bj_power monorepo (dashboard/mes/wms/wms_client/workstation), clear subproject git metadata and align naming to folder names
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
syntax = "v1"
|
||||
|
||||
import "base.api"
|
||||
|
||||
type (
|
||||
LoginReq {
|
||||
Username string `json:"username" validate:"required" comment:"账号"`
|
||||
Password string `json:"password" validate:"required" comment:"密码"`
|
||||
CaptchaId string `json:"captchaId,optional" comment:"验证码Id"`
|
||||
CaptchaCode string `json:"captchaCode,optional" comment:"验证码"`
|
||||
}
|
||||
RefreshTokenReq {
|
||||
AccessToken string `header:"Authorization"`
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
}
|
||||
TokenReply {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int `json:"accessExpire"`
|
||||
RefreshToken string `json:"refreshToken"`
|
||||
RefreshExpire int `json:"refreshExpire"`
|
||||
}
|
||||
)
|
||||
|
||||
@server (
|
||||
group: login
|
||||
prefix: /api/v1
|
||||
)
|
||||
service spherical-api {
|
||||
@doc "登录"
|
||||
@handler login
|
||||
post /login (LoginReq) returns (TokenReply)
|
||||
|
||||
@doc "刷新token"
|
||||
@handler refreshToken
|
||||
post /refreshToken (RefreshTokenReq) returns (TokenReply)
|
||||
}
|
||||
Reference in New Issue
Block a user