
package org.sky.scientific.excel;


import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.sky.core.tool.utils.DateUtil;

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


/**
 * 研发项目物料清单 Excel实体类
 *
 * @author Kd
 * @since 2025-07-17
 */
@Data
public class XmGoodsExcel implements Serializable {

	@Serial
	private static final long serialVersionUID = 1L;

	@ExcelProperty(index = 0, value ="序号")
	private String xh;

	@ExcelProperty(index = 1, value ="领用日期")
	@DateTimeFormat(DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	@NotNull(message = "领用日期不能为空")
	private Date useDate;

	private String useDateStr;

	@ExcelProperty(index = 2, value ="研发项目编号")
	@NotBlank(message = "研发项目编号不能为空")
	private String xmbh;

	@ExcelProperty(index = 3, value ="研发项目名称")
//	@NotBlank(message = "研发项目名称不能为空")
	private String xmmc;

 	@ExcelProperty(index = 4, value ="类型")
	@NotBlank(message = "类型不能为空")
	private String type;

	@ExcelProperty(index = 5, value ="物资编号")
	private String code;

	@ExcelProperty(index = 6, value ="物资名称")
	@NotBlank(message = "物资名称不能为空")
	private String name;

	@ExcelProperty(index = 7, value ="型号规格")
	private String model;

	@ExcelProperty(index = 8, value ="单位")
	@NotBlank(message = "请填写单位")
	private String unit;

	@ExcelProperty(index = 9, value ="单价（元）")
	@NotNull(message = "请填写单价")
	private BigDecimal unitPrice;

	@ExcelProperty(index = 10, value ="领取数量")
	@NotNull(message = "请填写领取数量")
	private Double useQuantity;

	@ExcelProperty(index = 11, value ="金额（元）")

	private BigDecimal amount;
}
