package com.bonus.canteen.core.supply.purchase.domain.bo;

import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

public class DrpMaterialLatestPriceDTO {
   @ApiModelProperty("货品id")
   private Long materialId;
   @ApiModelProperty("单位id")
   private Long unitId;
   @ApiModelProperty("最新价格 单位分")
   private Integer latestPrice;
   @ApiModelProperty("价格类型 1. 货品招标 2 采购询价、3 采购订单 4 入库、5 市场采集")
   private Integer priceType;
   @ApiModelProperty("关联单据编号")
   private String relatedId;
   @ApiModelProperty("备注")
   private String remark;
   @ApiModelProperty("供应商id")
   private Long supplierId;
   @ApiModelProperty("开始时间")
   private LocalDateTime startTime;
   @ApiModelProperty("结束时间")
   private LocalDateTime endTime;

   DrpMaterialLatestPriceDTO(final Long materialId, final Long unitId, final Integer latestPrice, final Integer priceType, final String relatedId, final String remark, final Long supplierId, final LocalDateTime startTime, final LocalDateTime endTime) {
      this.materialId = materialId;
      this.unitId = unitId;
      this.latestPrice = latestPrice;
      this.priceType = priceType;
      this.relatedId = relatedId;
      this.remark = remark;
      this.supplierId = supplierId;
      this.startTime = startTime;
      this.endTime = endTime;
   }

   public static DrpMaterialLatestPriceDTOBuilder builder() {
      return new DrpMaterialLatestPriceDTOBuilder();
   }

   public Long getMaterialId() {
      return this.materialId;
   }

   public Long getUnitId() {
      return this.unitId;
   }

   public Integer getLatestPrice() {
      return this.latestPrice;
   }

   public Integer getPriceType() {
      return this.priceType;
   }

   public String getRelatedId() {
      return this.relatedId;
   }

   public String getRemark() {
      return this.remark;
   }

   public Long getSupplierId() {
      return this.supplierId;
   }

   public LocalDateTime getStartTime() {
      return this.startTime;
   }

   public LocalDateTime getEndTime() {
      return this.endTime;
   }

   public DrpMaterialLatestPriceDTO setMaterialId(final Long materialId) {
      this.materialId = materialId;
      return this;
   }

   public DrpMaterialLatestPriceDTO setUnitId(final Long unitId) {
      this.unitId = unitId;
      return this;
   }

   public DrpMaterialLatestPriceDTO setLatestPrice(final Integer latestPrice) {
      this.latestPrice = latestPrice;
      return this;
   }

   public DrpMaterialLatestPriceDTO setPriceType(final Integer priceType) {
      this.priceType = priceType;
      return this;
   }

   public DrpMaterialLatestPriceDTO setRelatedId(final String relatedId) {
      this.relatedId = relatedId;
      return this;
   }

   public DrpMaterialLatestPriceDTO setRemark(final String remark) {
      this.remark = remark;
      return this;
   }

   public DrpMaterialLatestPriceDTO setSupplierId(final Long supplierId) {
      this.supplierId = supplierId;
      return this;
   }

   public DrpMaterialLatestPriceDTO setStartTime(final LocalDateTime startTime) {
      this.startTime = startTime;
      return this;
   }

   public DrpMaterialLatestPriceDTO setEndTime(final LocalDateTime endTime) {
      this.endTime = endTime;
      return this;
   }
   public static class DrpMaterialLatestPriceDTOBuilder {
      private Long materialId;
      private Long unitId;
      private Integer latestPrice;
      private Integer priceType;
      private String relatedId;
      private String remark;
      private Long supplierId;
      private LocalDateTime startTime;
      private LocalDateTime endTime;

      DrpMaterialLatestPriceDTOBuilder() {
      }

      public DrpMaterialLatestPriceDTOBuilder materialId(final Long materialId) {
         this.materialId = materialId;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder unitId(final Long unitId) {
         this.unitId = unitId;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder latestPrice(final Integer latestPrice) {
         this.latestPrice = latestPrice;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder priceType(final Integer priceType) {
         this.priceType = priceType;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder relatedId(final String relatedId) {
         this.relatedId = relatedId;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder remark(final String remark) {
         this.remark = remark;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder supplierId(final Long supplierId) {
         this.supplierId = supplierId;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder startTime(final LocalDateTime startTime) {
         this.startTime = startTime;
         return this;
      }

      public DrpMaterialLatestPriceDTOBuilder endTime(final LocalDateTime endTime) {
         this.endTime = endTime;
         return this;
      }

      public DrpMaterialLatestPriceDTO build() {
         return new DrpMaterialLatestPriceDTO(this.materialId, this.unitId, this.latestPrice, this.priceType, this.relatedId, this.remark, this.supplierId, this.startTime, this.endTime);
      }
   }
}
