package cn.reghao.bnt.web.admin.model.dto;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 用户登入提交的数据
 *
 * @author reghao
 * @date 2021-11-17 16:36:05
 */
@Setter
@Getter
public class AccountLoginDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotBlank
    private String principal;
    @NotBlank
    private String credential;
    @Length(min = 5, max = 5, message = "图形验证码应是 5 个字符")
    private String captchaCode;
    private Boolean rememberMe;

    public AccountLoginDto() {
        this.rememberMe = false;
    }
}
