package com.lesingle.edu.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * 加密登录请求 DTO
 * 用于 RSA 加密传输的登录请求
 */
@Data
@Schema(description = "加密登录请求")
public class EncryptedLoginRequest {

    @NotBlank(message = "账号不能为空")
    @Schema(description = "登录账号（明文）")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Schema(description = "RSA 加密后的密码（Base64 编码）")
    private String encryptedPassword;

    @NotBlank(message = "角色不能为空")
    @Schema(description = "登录角色")
    private String role;

    @Schema(description = "密钥版本号（可选，用于兼容性）")
    private Long keyVersion;
}
