refactor: flatten dto entity and mapper packages
This commit is contained in:
29
src/main/java/com/label/dto/LoginResponse.java
Normal file
29
src/main/java/com/label/dto/LoginResponse.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.label.dto;
|
||||
|
||||
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;
|
||||
/** 用户主键 */
|
||||
@Schema(description = "用户主键")
|
||||
private Long userId;
|
||||
/** 登录用户名 */
|
||||
@Schema(description = "登录用户名")
|
||||
private String username;
|
||||
/** 角色:UPLOADER / ANNOTATOR / REVIEWER / ADMIN */
|
||||
@Schema(description = "角色", example = "ADMIN")
|
||||
private String role;
|
||||
/** Token 有效期(秒) */
|
||||
@Schema(description = "Token 有效期(秒)", example = "7200")
|
||||
private Long expiresIn;
|
||||
}
|
||||
Reference in New Issue
Block a user