package com.srs.dormitory.domain.Dto;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

@Data
public class AddForeignApplicationDto {
    @NotEmpty(message = "请输入申请人姓名")
    private String applicantName;
    @NotEmpty(message = "请输入申请人性别")
    @Pattern(regexp = "^(男|女)$", message = "性别只能是“男”或“女”")
    private String applicantGender;
    @NotEmpty(message = "请输入申请人身份证号")
    private String idCard;
    @NotEmpty(message = "请输入申请人手机号")
    @Pattern(regexp = "^[0-9]+$", message = "手机号只能包含数字")
    private String phoneNumber;
    @NotNull(message = "请输入校内联系人ID")
    private Long campusContactId;
    private String reason;
    @NotNull(message = "请输入入住开始时间")
    private LocalDateTime startDate;
    @NotNull(message = "请输入入住结束时间")
    private LocalDateTime endDate;
}
