package com.yifu.cloud.plus.v1.yifu.archives.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
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 org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 合同流程中信息记录表
 *
 * @author system
 * @date 2026-04-23
 */
@Data
@TableName("t_contract_pre_detail")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "合同流程中信息记录表")
public class TContractPreDetail extends BaseEntity {

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

	/**
	 * 申请编号
	 */
	@ExcelAttribute(name = "申请编号", maxLength = 100)
	@Length(max = 100, message = "申请编号不能超过100个字符")
	@ExcelProperty("申请编号")
	@Schema(description = "申请编号")
	private String applyNo;

	/**
	 * 申请人
	 */
	@ExcelAttribute(name = "申请人", maxLength = 100)
	@Length(max = 100, message = "申请人不能超过100个字符")
	@ExcelProperty("申请人")
	@Schema(description = "申请人")
	private String applicantName;

	/**
	 * 申请时间
	 */
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelAttribute(name = "申请时间")
	@ExcelProperty("申请时间")
	@Schema(description = "申请时间")
	private Date applyTime;

	/**
	 * 档案所在地
	 */
	@ExcelAttribute(name = "档案所在地", maxLength = 200)
	@Length(max = 200, message = "档案所在地不能超过200个字符")
	@ExcelProperty("档案所在地")
	@Schema(description = "档案所在地")
	private String fileLocation;

	/**
	 * 合同类型
	 */
	@ExcelAttribute(name = "合同类型", maxLength = 50)
	@Length(max = 50, message = "合同类型不能超过50个字符")
	@ExcelProperty("合同类型")
	@Schema(description = "合同类型")
	private String contractType;

	/**
	 * 签订类型
	 */
	@ExcelAttribute(name = "签订类型", maxLength = 50)
	@Length(max = 50, message = "签订类型不能超过50个字符")
	@ExcelProperty("签订类型")
	@Schema(description = "签订类型")
	private String signType;

	/**
	 * 签订期限
	 */
	@ExcelAttribute(name = "签订期限", maxLength = 50)
	@Length(max = 50, message = "签订期限不能超过50个字符")
	@ExcelProperty("签订期限")
	@Schema(description = "签订期限")
	private String signTerm;

	/**
	 * 合同起始日期
	 */
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
	@ExcelAttribute(name = "合同起始日期")
	@ExcelProperty("合同起始日期")
	@Schema(description = "合同起始日期")
	private Date contractStartDate;

	/**
	 * 合同截止日期
	 */
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
	@ExcelAttribute(name = "合同截止日期")
	@ExcelProperty("合同截止日期")
	@Schema(description = "合同截止日期")
	private Date contractEndDate;

	/**
	 * 审核状态（0：待提交；1：待审核；2审核通过；3审核不通过；4签署中；5撤销签署；6签署失败）
	 */
	@ExcelAttribute(name = "审核状态", maxLength = 20)
	@Length(max = 20, message = "审核状态不能超过20个字符")
	@ExcelProperty("审核状态")
	@Schema(description = "审核状态（0：待提交；1：待审核；2审核通过；3审核不通过；4签署中；5撤销签署；6签署失败）")
	private String auditStatus;

	/**
	 * 合同状态
	 */
	@ExcelAttribute(name = "合同状态", maxLength = 20)
	@Length(max = 20, message = "合同状态不能超过20个字符")
	@ExcelProperty("合同状态")
	@Schema(description = "合同状态")
	private String contractStatus;

	/**
	 * 入职确认信息主表id
	 */
	@ExcelAttribute(name = "入职确认信息主表id", maxLength = 64)
	@Length(max = 64, message = "入职确认信息主表id不能超过64个字符")
	@ExcelProperty("入职确认信息主表id")
	@Schema(description = "入职确认信息主表id")
	private String registerId;
}
