docs: 为 auth 类型定义添加详细注释
- 为每个字段添加 JSDoc 注释说明 - 为每个接口添加描述性注释 - 提高代码可读性和可维护性
This commit is contained in:
@@ -2,23 +2,44 @@
|
|||||||
* 认证相关类型定义
|
* 认证相关类型定义
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录请求参数
|
||||||
|
*/
|
||||||
export interface LoginRequest {
|
export interface LoginRequest {
|
||||||
|
/** 用户名 */
|
||||||
username: string;
|
username: string;
|
||||||
|
/** 密码 */
|
||||||
password: string;
|
password: string;
|
||||||
|
/** 验证码缓存key */
|
||||||
captchaId?: string;
|
captchaId?: string;
|
||||||
|
/** 验证码 */
|
||||||
captchaCode?: string;
|
captchaCode?: string;
|
||||||
|
/** 记住我 */
|
||||||
rememberMe?: boolean;
|
rememberMe?: boolean;
|
||||||
|
/** 租户ID */
|
||||||
tenantId?: number;
|
tenantId?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录响应
|
||||||
|
*/
|
||||||
export interface LoginResult {
|
export interface LoginResult {
|
||||||
|
/** 访问令牌 */
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
|
/** 刷新令牌 */
|
||||||
refreshToken: string;
|
refreshToken: string;
|
||||||
|
/** 令牌类型 */
|
||||||
tokenType: string;
|
tokenType: string;
|
||||||
|
/** 过期时间(单位:秒) */
|
||||||
expiresIn: number;
|
expiresIn: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证码响应
|
||||||
|
*/
|
||||||
export interface CaptchaInfo {
|
export interface CaptchaInfo {
|
||||||
|
/** 验证码缓存key */
|
||||||
captchaId: string;
|
captchaId: string;
|
||||||
|
/** 验证码图片Base64 */
|
||||||
captchaBase64: string;
|
captchaBase64: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user