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