/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */
package com.yifu.cloud.plus.v1.yifu.archives.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 人员档案表
 *
 * @author hgw
 * @date 2022-06-20 09:55:06
 */
@Data
@TableName("t_employee_info")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "人员档案表")
public class TEmployeeInfo extends BaseEntity {

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@Schema(description = "主键")
	private String id;

	/**
	 * 员工主码（系统自动生成：ZM+年月日+5位数字）
	 */
	@Schema(description = "员工主码（系统自动生成：ZM+年月日+5位数字）")
	private String empCode;

	/**
	 * 员工类型（字典值，0外包1派遣2代理）
	 */
	@Schema(description = "员工类型（字典值，0外包1派遣2代理）")
	@NotNull( message = "员工类型不可为空")
	@Max(value = 1, message = "员工类型不可超过1位")
	private String empNatrue;

	/**
	 * 员工姓名
	 */
	@Schema(description = "员工姓名")
	@NotNull( message = "员工姓名不可为空")
	@Size(max = 20, message = "员工姓名不可超过20位")
	private String empName;

	/**
	 * 身份证号码
	 */
	@Schema(description = "身份证号码")
	@NotNull( message = "身份证号码不可为空")
	@Size(max = 20, message = "身份证号码不可超过20位")
	private String empIdcard;

	/**
	 * 身份证有效期起
	 */
	@Schema(description = "身份证有效期起")
	private LocalDate validityStart;

	/**
	 * 身份证有效期止
	 */
	@Schema(description = "身份证有效期止")
	private LocalDate validityEnd;

	/**
	 * 性别
	 */
	@Schema(description = "性别")
	private String empSex;

	/**
	 * 出生日期
	 */
	@Schema(description = "出生日期")
	private LocalDate empBirthday;

	/**
	 * 年龄
	 */
	@Schema(description = "年龄")
	@Max(value = 200, message = "年龄不可超过200")
	private Integer empAge;

	/**
	 * 婚姻状态
	 */
	@Schema(description = "婚姻状态")
	private String empMarriStatus;

	/**
	 * 民族
	 */
	@Schema(description = "民族")
	private String empNational;

	/**
	 * 政治面貌
	 */
	@Schema(description = "政治面貌")
	@Size(max = 32, message = "政治面貌不可超过32位")
	private String politicalStatus;

	/**
	 * 邮箱
	 */
	@Schema(description = "邮箱")
	@Size(max = 32, message = "邮箱不可超过32位")
	private String empEmail;

	/**
	 * 手机号码
	 */
	@Schema(description = "手机号码")
	@NotNull( message = "手机号码不可为空")
	@Size(max = 11,min = 11, message = "手机号码只能11位")
	private String empPhone;

	/**
	 * 身份证-省
	 */
	@Schema(description = "身份证-省")
	private Integer idProvince;

	/**
	 * 身份证-市
	 */
	@Schema(description = "身份证-市")
	private Integer idCity;

	/**
	 * 身份证-县
	 */
	@Schema(description = "身份证-县")
	private Integer idTown;

	/**
	 * 户口性质
	 */
	@Schema(description = "户口性质")
	private String empRegisType;

	/**
	 * 档案-省
	 */
	@Schema(description = "档案-省")
	private Integer fileProvince;

	/**
	 * 档案-市
	 */
	@Schema(description = "档案-市")
	private Integer fileCity;

	/**
	 * 档案-县
	 */
	@Schema(description = "档案-县")
	private Integer fileTown;

	/**
	 * 是否大专及以上（0否1是）
	 */
	@Schema(description = "是否大专及以上（0否1是）")
	private Integer isCollege;

	/**
	 * 最高学历（字典值）
	 */
	@Schema(description = "最高学历（字典值）")
	private String hignEducation;

	/**
	 * 学校
	 */
	@Schema(description = "学校")
	private String school;

	/**
	 * 专业
	 */
	@Schema(description = "专业")
	private String major;

	/**
	 * 入学时间
	 */
	@Schema(description = "入学时间")
	private LocalDate admissionDate;

	/**
	 * 毕业时间
	 */
	@Schema(description = "毕业时间")
	private LocalDate gradutionDate;

	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

	/**
	 * 人员档案来源（字典：4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬）
	 */
	@Schema(description = "人员档案来源（字典：4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬）")
	private String fileSource;

	/**
	 * 人员档案状态（0草稿、1已审核）
	 */
	@Schema(description = "人员档案状态（0草稿、1已审核）")
	private Integer status;

	/**
	 * 档案状态（0正常；1已减档）
	 */
	@Schema(description = "档案状态（0正常；1已减档）")
	private Integer fileStatus;

	/**
	 * 现存项目数
	 */
	@Schema(description = "现存项目数")
	private Integer projectNum;

	/**
	 * 员工合同状态（字典）
	 */
	@Schema(description = "员工合同状态（字典）")
	private Integer contractStatus;

	/**
	 * 商险状态（字典）
	 */
	@Schema(description = "商险状态（字典）")
	private Integer insuranceStatus;

	/**
	 * 社保状态（字典）
	 */
	@Schema(description = "社保状态（字典）")
	private Integer socialStatus;

	/**
	 * 公积金状态（字典）
	 */
	@Schema(description = "公积金状态（字典）")
	private Integer fundStatus;

	/**
	 * 近3个月发薪（0否；1是）
	 */
	@Schema(description = "近3个月发薪（0否；1是）")
	private Integer salaryStatus;

	/**
	 * 是否删除 0否/1是
	 */
	@Schema(description = "是否删除 0否/1是")
	private String deleteFlag;

	/**
	 * 创建人id
	 */
	@Schema(description = "创建人id")
	private String createBy;

	/**
	 * 创建人姓名
	 */
	@Schema(description = "创建人姓名")
	private String createName;

	/**
	 * 创建时间
	 */
	@Schema(description = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 更新人id
	 */
	@Schema(description = "更新人id")
	private String updateBy;

	/**
	 * 更新时间
	 */
	@Schema(description = "更新时间")
	private LocalDateTime updateTime;

	/**
	 * 离职操作人id
	 */
	@Schema(description = "离职操作人id")
	private String leaveUser;

	/**
	 * 离职时间
	 */
	@Schema(description = "离职时间")
	private LocalDateTime leaveTime;

	/**
	 * 离职原因
	 */
	@Schema(description = "离职原因")
	private String leaveReason;

	/**
	 * 离职备注
	 */
	@Schema(description = "离职备注")
	private String leaveRemark;

	/**
	 * 通信地址
	 */
	@Schema(description = "通信地址")
	private String contactAddress;

	// 以下是项目档案信息
	@TableField(exist = false)
	@Schema(description = "项目id")
	private String deptId;

	@TableField(exist = false)
	@Schema(description = "项目名称")
	private String deptName;

	@TableField(exist = false)
	@Schema(description = "项目编码")
	private String deptNo;

	@TableField(exist = false)
	@Schema(description = "就职岗位")
	private String post;


}
