
package org.sky.scientific.pojo.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.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.sky.core.tenant.mp.TenantEntity;

import java.io.Serial;

/**
 * 技术人员花名册 实体类
 *
 * @author Kd
 * @since 2025-06-11
 */
@Data
@TableName("kd_technician")
@Schema(description = "Technician对象")
@EqualsAndHashCode(callSuper = true)
public class TechnicianEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@JsonSerialize(
		using = ToStringSerializer.class
	)
	@Schema(
		description = "主键id"
	)
	@TableId(
		value = "id",
		type = IdType.AUTO
	)
	private Long id;

	@Schema(description = "姓名")
	@NotNull
	private String name;

	@Schema(description = "唯一标识")
	private String unicode;

	@Schema(description = "工号")
	private String number;

	@Schema(description = "身份证号码")
	private String idCard;

	@Schema(description = "性别，1：男，2：女")
	private Integer gender;

	@Schema(description = "出生日期")
	private String birthday;

	@Schema(description = "民族")
	private String ethnic;

	@Schema(description = "所属二级单位id")
	private Long departmentId;

	@Schema(description = "所属二级单位/部门/科室/项目部")
	private String department;

	@Schema(description = "岗位职务")
	private String post;

	@Schema(description = "岗位所在地")
	private String postLocation;

	@Schema(description = "用工性质")
	private String nature;

	@Schema(description = "是否为外聘科技人员")
	@TableField(exist = false)
	private boolean isForeign;

	@Schema(description = "入职时间")
//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
//	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private String hireDate;

	@Schema(description = "最高学历")
	private String education;

	@Schema(description = "最高学位")
	private String degree;

	@Schema(description = "最高学历学校")
	private String schoolName;

	@Schema(description = "最高学历专业名称")
	private String major;

	@Schema(description = "职称")
	private String rank;

	@Schema(description = "执业资格")
	private String practicingRequirement;

	@Schema(description = "参研情况")
	private String situation;

	@Schema(description = "人员类型")
	private String personnelType;

	@Schema(description = "所属年月")
	private String yearAndMonth;

	@Schema(description = "情况说明")
	private String remark;

}
