package jnpf.model.personnels.vo.employment;

import cn.hutool.core.lang.RegexPool;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import jnpf.easyexcel.StaffDateStringConverter;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.groups.Default;
import java.util.Date;

/**
 * @Title: AddStaffEmploymentApplyExcelVO
 * @Author: peng.hao
 * @create: 2024/2/19 17:32
 */
@Getter
@Setter
@EqualsAndHashCode
public class AddStaffEmploymentApplyExcelVO {

    /**
     * 姓名
     */
    @ExcelProperty( index = 0,value = "姓名")
    @NotBlank(message = "姓名不能为空",groups= Default.class)
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z]{1,20}([·.][\\u4e00-\\u9fa5a-zA-Z]{1,20})*$", message = "请输入中文或英文名称，名字中间允许添加符号.或·")
    private String workerName;
    /**
     * 手机号
     */
    @ExcelProperty(index = 1,value = "手机号码")
    @NotBlank(message = "手机号不能为空",groups= Default.class)
    @Pattern(regexp = RegexPool.MOBILE,groups= Default.class,message = "手机号格式有误")
    private String phone;
    /**
     * 组织
     */
    @ExcelProperty(index =2,value = "组织")
    @NotBlank(message = "组织不能为空",groups= Default.class)
    private String currOrgName;

    @ExcelIgnore
    private String currOrgId;
    /**
     * 组织id
     */
    @ExcelProperty(index = 3,value = "组织ID")
    private String currOrg;

    /**
     * 合同类型
     */
    @ExcelIgnore
    private String contractTypeName;
    /**
     * 考勤组Id
     */
    @ExcelIgnore
    private String attendanceGroup;
    /**
     * 考勤组
     */
    @ExcelProperty(index = 4, value = "考勤组")
    private String attendanceGroupName;

    @ExcelIgnore
    private String contractType;

    /**
     * 预计入职日期
     */
    @ExcelProperty(index = 5, value = "预计入职日期", converter = StaffDateStringConverter.class)
    @NotNull(message = "预计入职日期不能为空或者格式有问题", groups = Default.class)
    private Date expectedStartDate;
    /**
     * 入职岗位
     */
    @ExcelProperty(index = 6,value = "入职岗位")
    @NotBlank(message = "入职岗位不能为空",groups= Default.class)
    private String currPositionName;

    @ExcelIgnore
    private String currPositionId;
    /**
     * 入职岗位id
     */
    @ExcelProperty(index = 7,value = "岗位ID")
    private String currPosition;
    /**
     * 职等id
     */
    @ExcelProperty(index = 8,value = "入职职等")
    @NotBlank(message = "入职职等不能为空",groups= Default.class)
    private String currRankName;

    @ExcelIgnore
    private String currRankId;

    @ExcelIgnore
    private String currRank;
}
