
package org.sky.scientific.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.sky.core.tenant.mp.TenantEntity;
import org.sky.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 科研项目 实体类
 *
 * @author Kd
 * @since 2025-06-29
 */
@Data
@TableName("kd_xm")
@Schema(description = "Xm对象")
@EqualsAndHashCode(callSuper = true)
public class XmEntity extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "项目编号")
	@NotBlank(message = "项目编号不能为空")
	private String xmbh;

	@NotBlank(message = "项目名称不能为空")
	@Schema(description = "研发项目名称")
	private String xmmc;

 	@Schema(description = "项目负责人id，kd_technician的主键")
	private Long xmfzr;

	@Schema(description = "项目负责人姓名")
	@TableField(exist = false)
	private String xmfzrxm;

	@Schema(description = "项目申请单位id")
	//	@NotBlank(message = "项目申请单位不能为空")
	private Long xmsqdwid;

	@Schema(description = "项目申请单位")
	@TableField(exist = false)
	private String xmsqdw;

	//	@NotBlank(message = "请选择研究类型")
	@Schema(description = "研究类型")
	private String yjlx;

	//	@NotNull(message = "请选择研发开始时间")
	@Schema(description = "研发开始时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date xmkssj;

	//	@NotNull(message = "请选择研发结束时间")
	@Schema(description = "研发结束时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date xmjssj;

	//	@NotBlank(message = "请选择项目来源")
	@Schema(description = "项目来源")
	private String xmly;

	//	@NotNull(message = "请选择项目开展形式")
	@Schema(description = "项目开展形式")
	private String xmkzxs;

	//	@NotBlank(message = "请选择预期成果形式")
	@Schema(description = "预期成果形式")
	private String yqcgxs;

	//	@NotBlank(message = "请填写项目技术经济目标")
	@Schema(description = "项目技术经济目标")
	private String xmjsjjmb;

	@Schema(description = "项目预算总额（万元）")
	private BigDecimal xmysze;

	@Schema(description = "项目预算明细")
	private String xmyszemx;

	@NotBlank(message = "请上传立项批文")
	@Schema(description = "立项批文")
	private String lxpw;

	@NotBlank(message = "请上传立项报告")
	@Schema(description = "立项报告")
	private String lxbg;

	@Schema(description = "其他资料")
	private String qtzl;
}
