package cn.reghao.oss.console.account.model.dto;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author reghao
 * @date 2023-10-23 17:38:19
 */
@Setter
@Getter
public class CreateAccountDto {
    @NotBlank(message = "必须指定登录名")
    private String username;
    @NotBlank(message = "必须指定用户名")
    private String screenName;
    @NotBlank(message = "必须指定登录密码")
    private String password;
    @NotNull(message = "必须选择用户角色")
    private Integer roleId;

    public CreateAccountDto(String username, String password, int roleId) {
        this.username = username;
        this.screenName = username;
        this.password = password;
        this.roleId = roleId;
    }
}
