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

import javax.validation.constraints.AssertTrue;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 临时工首次登记请求体。
 */
public class WorkerRegisterRequest {

    @NotBlank(message = "真实姓名不能为空")
    @Size(min = 2, max = 64, message = "真实姓名长度为2-64个字符")
    private String realName;

    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",
            message = "身份证号格式不正确")
    private String idCardNo;

    @NotBlank(message = "银行卡号不能为空")
    @Pattern(regexp = "^\\d{16,19}$", message = "银行卡号格式不正确")
    private String bankAccount;

    @NotBlank(message = "开户银行不能为空")
    @Size(max = 100, message = "开户银行名称过长")
    private String bankName;

    @Size(max = 200, message = "支行名称过长")
    private String bankBranch;

    @AssertTrue(message = "须同意《电子劳动合同》")
    private Boolean agreedLaborContract;

    @AssertTrue(message = "须同意《隐私政策》")
    private Boolean agreedPrivacyPolicy;

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo;
    }

    public String getBankAccount() {
        return bankAccount;
    }

    public void setBankAccount(String bankAccount) {
        this.bankAccount = bankAccount;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankBranch() {
        return bankBranch;
    }

    public void setBankBranch(String bankBranch) {
        this.bankBranch = bankBranch;
    }

    public Boolean getAgreedLaborContract() {
        return agreedLaborContract;
    }

    public void setAgreedLaborContract(Boolean agreedLaborContract) {
        this.agreedLaborContract = agreedLaborContract;
    }

    public Boolean getAgreedPrivacyPolicy() {
        return agreedPrivacyPolicy;
    }

    public void setAgreedPrivacyPolicy(Boolean agreedPrivacyPolicy) {
        this.agreedPrivacyPolicy = agreedPrivacyPolicy;
    }
}
