package com.huimv.employment.service.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;

@Schema(description = "设置或修改登录密码请求（需 JWT）")
public class PasswordSetRequest {

    @Schema(description = "登录用户名，首次设密必填；改密时可不传", example = "zhangsan")
    private String username;

    @Schema(description = "新密码（RSA 加密 Base64）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "密码不能为空")
    private String encryptedPassword;

    @Schema(description = "确认新密码（RSA 加密 Base64），须与新密码明文一致", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "确认密码不能为空")
    private String encryptedConfirmPassword;

    @Schema(description = "旧密码（RSA 加密 Base64），已设密用户改密时必填")
    private String encryptedOldPassword;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getEncryptedPassword() {
        return encryptedPassword;
    }

    public void setEncryptedPassword(String encryptedPassword) {
        this.encryptedPassword = encryptedPassword;
    }

    public String getEncryptedConfirmPassword() {
        return encryptedConfirmPassword;
    }

    public void setEncryptedConfirmPassword(String encryptedConfirmPassword) {
        this.encryptedConfirmPassword = encryptedConfirmPassword;
    }

    public String getEncryptedOldPassword() {
        return encryptedOldPassword;
    }

    public void setEncryptedOldPassword(String encryptedOldPassword) {
        this.encryptedOldPassword = encryptedOldPassword;
    }
}
