2026-04-14 13:39:24 +08:00
|
|
|
|
package com.label.dto;
|
2026-04-14 13:31:50 +08:00
|
|
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 登录成功响应体。
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Data
|
|
|
|
|
|
@AllArgsConstructor
|
|
|
|
|
|
@Schema(description = "登录响应")
|
|
|
|
|
|
public class LoginResponse {
|
|
|
|
|
|
/** Bearer Token(UUID v4),后续请求放入 Authorization 头 */
|
|
|
|
|
|
@Schema(description = "Bearer Token", example = "550e8400-e29b-41d4-a716-446655440000")
|
|
|
|
|
|
private String token;
|
|
|
|
|
|
/** 用户主键 */
|
2026-04-15 15:28:11 +08:00
|
|
|
|
@Schema(description = "用户主键", example = "1")
|
2026-04-14 13:31:50 +08:00
|
|
|
|
private Long userId;
|
|
|
|
|
|
/** 登录用户名 */
|
2026-04-15 15:28:11 +08:00
|
|
|
|
@Schema(description = "登录用户名", example = "admin")
|
2026-04-14 13:31:50 +08:00
|
|
|
|
private String username;
|
|
|
|
|
|
/** 角色:UPLOADER / ANNOTATOR / REVIEWER / ADMIN */
|
|
|
|
|
|
@Schema(description = "角色", example = "ADMIN")
|
|
|
|
|
|
private String role;
|
|
|
|
|
|
/** Token 有效期(秒) */
|
|
|
|
|
|
@Schema(description = "Token 有效期(秒)", example = "7200")
|
|
|
|
|
|
private Long expiresIn;
|
|
|
|
|
|
}
|