/**
 * BladeX Commercial License Agreement
 * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
 * <p>
 * Use of this software is governed by the Commercial License Agreement
 * obtained after purchasing a license from BladeX.
 * <p>
 * 1. This software is for development use only under a valid license
 * from BladeX.
 * <p>
 * 2. Redistribution of this software's source code to any third party
 * without a commercial license is strictly prohibited.
 * <p>
 * 3. Licensees may copyright their own code but cannot use segments
 * from this software for such purposes. Copyright of this software
 * remains with BladeX.
 * <p>
 * Using this software signifies agreement to this License, and the software
 * must not be used for illegal purposes.
 * <p>
 * THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
 * not liable for any claims arising from secondary or illegal development.
 * <p>
 * Author: Chill Zhuang (bladejava@qq.com)
 */
package org.springblade.zhaocai.pojo.entity;

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 lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 年度招采计划物料明细实体类
 *
 * @author Chill
 */
@Data
@TableName("zc_procurement_plan_material")
@EqualsAndHashCode(callSuper = true)
public class ProcurementPlanMaterial extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * 主表ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@Schema(description = "主表ID")
	private Long planId;

	/**
	 * 项目明细ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@Schema(description = "项目明细ID")
	private Long projectId;

	/**
	 * 序号
	 */
	@Schema(description = "序号")
	private Integer sortNo;

	/**
	 * 物料名称
	 */
	@Schema(description = "物料名称")
	private String materialName;

	/**
	 * 物料编码
	 */
	@Schema(description = "物料编码")
	private String materialCode;

	/**
	 * 规格型号
	 */
	@Schema(description = "规格型号")
	private String specification;

	/**
	 * 品牌
	 */
	@Schema(description = "品牌")
	private String brand;

	/**
	 * 计量单位
	 */
	@Schema(description = "计量单位")
	private String unit;

	/**
	 * 参考价
	 */
	@Schema(description = "参考价")
	private BigDecimal referencePrice;

	/**
	 * 预计数量
	 */
	@Schema(description = "预计数量")
	private Integer quantity;

	/**
	 * 预估金额（元）
	 */
	@Schema(description = "预估金额（元）")
	private BigDecimal estimatedAmount;

	/**
	 * 对接人
	 */
	@Schema(description = "对接人")
	private String contactPerson;

	/**
	 * 对接人ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@Schema(description = "对接人ID")
	private Long contactPersonId;

	/**
	 * 计划申请日期
	 */
	@Schema(description = "计划申请日期")
	private LocalDate applyDate;

	/**
	 * 期望使用/完成日期
	 */
	@Schema(description = "期望使用/完成日期")
	private LocalDate expectDate;

	/**
	 * 去年总量
	 */
	@Schema(description = "去年总量")
	private Integer lastYearTotal;

	/**
	 * 去年均价
	 */
	@Schema(description = "去年均价")
	private BigDecimal lastYearAvgPrice;

	/**
	 * 去年总金额
	 */
	@Schema(description = "去年总金额")
	private BigDecimal lastYearTotalAmount;

	/**
	 * 需求简介
	 */
	@Schema(description = "需求简介")
	private String requirementIntro;

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

}
