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

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bonus.canteen.core.supply.purchase.constants.DrpOrderGoodsStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@ApiModel(
   value = "DrpOrderGoods对象",
   description = "采购订单主表"
)
public class DrpOrderGoods {
   @TableId
   @ApiModelProperty("采购订单号")
   private String orderGoodsId;
   @ApiModelProperty("供应商id")
   private Long supplierId;
   @ApiModelProperty("订单状态(1待提交,2已提交)")
   private Integer orderStatus;
   @ApiModelProperty("采购订单总金额")
   private Long orderAmount;
   @ApiModelProperty("期望送货日期")
   private LocalDate requestArrivalTime;
   @ApiModelProperty("备注说明")
   private String remark;
   @ApiModelProperty("是否已经拆单(1是2否)")
   private Integer ifDismantle;
   @ApiModelProperty("删除标识")
   private Integer delFlag;
   @TableField(
      value = "createBy",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建人")
   private String createBy;
   @TableField(
      value = "createTime",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建时间")
   private LocalDateTime createTime;
   @TableField(
      value = "updateBy",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新人")
   private String updateBy;
   @TableField(
      value = "updateTime",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新时间")
   private LocalDateTime updateTime;
   @ApiModelProperty("仓库id")
   private Long warehouseId;
   @ApiModelProperty("供货地址")
   private String supplyAddress;
   @ApiModelProperty("订单标题")
   private String orderTitle;
   @ApiModelProperty("采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
   private Integer approveStatus;
   @ApiModelProperty("审批流程id")
   private Long processInstanceId;
   @ApiModelProperty("审批人")
   private String approveBy;
   @ApiModelProperty("审批完成时间")
   private LocalDateTime approveTime;
   @ApiModelProperty("审批备注")
   private String approveRemark;
   @ApiModelProperty("供应商待确认状态(1待确认,2确认通过,3已拒绝)")
   private Integer supplierConfirmStatus;
   @ApiModelProperty("订单数量")
   private BigDecimal totalNum;
   @ApiModelProperty("入库数量")
   private BigDecimal totalIntoNum;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("档口id")
   private String stallId;
   @ApiModelProperty("供应商确认时间")
   private LocalDateTime confirmTime;
   @ApiModelProperty("供应商确认备注")
   private String confirmRemark;
   @ApiModelProperty("区域id")
   private Long areaId;

   public boolean isDeleteStatus() {
      return ObjectUtil.equal(DrpOrderGoodsStatusEnum.IS_COMMIT.getKey(), this.orderStatus);
   }

   public String getOrderGoodsId() {
      return this.orderGoodsId;
   }

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

   public Integer getOrderStatus() {
      return this.orderStatus;
   }

   public Long getOrderAmount() {
      return this.orderAmount;
   }

   public LocalDate getRequestArrivalTime() {
      return this.requestArrivalTime;
   }

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

   public Integer getIfDismantle() {
      return this.ifDismantle;
   }

   public Integer getDelFlag() {
      return this.delFlag;
   }
   public Long getWarehouseId() {
      return this.warehouseId;
   }

   public String getSupplyAddress() {
      return this.supplyAddress;
   }

   public String getOrderTitle() {
      return this.orderTitle;
   }

   public Integer getApproveStatus() {
      return this.approveStatus;
   }

   public Long getProcessInstanceId() {
      return this.processInstanceId;
   }

   public String getApproveBy() {
      return this.approveBy;
   }

   public LocalDateTime getApproveTime() {
      return this.approveTime;
   }

   public String getApproveRemark() {
      return this.approveRemark;
   }

   public Integer getSupplierConfirmStatus() {
      return this.supplierConfirmStatus;
   }

   public BigDecimal getTotalNum() {
      return this.totalNum;
   }

   public BigDecimal getTotalIntoNum() {
      return this.totalIntoNum;
   }

   public Long getCanteenId() {
      return this.canteenId;
   }

   public String getStallId() {
      return this.stallId;
   }

   public LocalDateTime getConfirmTime() {
      return this.confirmTime;
   }

   public String getConfirmRemark() {
      return this.confirmRemark;
   }

   public Long getAreaId() {
      return this.areaId;
   }

   public DrpOrderGoods setOrderGoodsId(final String orderGoodsId) {
      this.orderGoodsId = orderGoodsId;
      return this;
   }

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

   public DrpOrderGoods setOrderStatus(final Integer orderStatus) {
      this.orderStatus = orderStatus;
      return this;
   }

   public DrpOrderGoods setOrderAmount(final Long orderAmount) {
      this.orderAmount = orderAmount;
      return this;
   }

   public DrpOrderGoods setRequestArrivalTime(final LocalDate requestArrivalTime) {
      this.requestArrivalTime = requestArrivalTime;
      return this;
   }

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

   public DrpOrderGoods setIfDismantle(final Integer ifDismantle) {
      this.ifDismantle = ifDismantle;
      return this;
   }

   public DrpOrderGoods setDelFlag(final Integer delFlag) {
      this.delFlag = delFlag;
      return this;
   }

   public DrpOrderGoods setWarehouseId(final Long warehouseId) {
      this.warehouseId = warehouseId;
      return this;
   }

   public DrpOrderGoods setSupplyAddress(final String supplyAddress) {
      this.supplyAddress = supplyAddress;
      return this;
   }

   public DrpOrderGoods setOrderTitle(final String orderTitle) {
      this.orderTitle = orderTitle;
      return this;
   }

   public DrpOrderGoods setApproveStatus(final Integer approveStatus) {
      this.approveStatus = approveStatus;
      return this;
   }

   public DrpOrderGoods setProcessInstanceId(final Long processInstanceId) {
      this.processInstanceId = processInstanceId;
      return this;
   }

   public DrpOrderGoods setApproveBy(final String approveBy) {
      this.approveBy = approveBy;
      return this;
   }

   public DrpOrderGoods setApproveTime(final LocalDateTime approveTime) {
      this.approveTime = approveTime;
      return this;
   }

   public DrpOrderGoods setApproveRemark(final String approveRemark) {
      this.approveRemark = approveRemark;
      return this;
   }

   public DrpOrderGoods setSupplierConfirmStatus(final Integer supplierConfirmStatus) {
      this.supplierConfirmStatus = supplierConfirmStatus;
      return this;
   }

   public DrpOrderGoods setTotalNum(final BigDecimal totalNum) {
      this.totalNum = totalNum;
      return this;
   }

   public DrpOrderGoods setTotalIntoNum(final BigDecimal totalIntoNum) {
      this.totalIntoNum = totalIntoNum;
      return this;
   }

   public DrpOrderGoods setCanteenId(final Long canteenId) {
      this.canteenId = canteenId;
      return this;
   }

   public DrpOrderGoods setStallId(final String stallId) {
      this.stallId = stallId;
      return this;
   }

   public DrpOrderGoods setConfirmTime(final LocalDateTime confirmTime) {
      this.confirmTime = confirmTime;
      return this;
   }

   public DrpOrderGoods setConfirmRemark(final String confirmRemark) {
      this.confirmRemark = confirmRemark;
      return this;
   }

   public DrpOrderGoods setAreaId(final Long areaId) {
      this.areaId = areaId;
      return this;
   }

   public String getCreateBy() {
      return createBy;
   }

   public DrpOrderGoods setCreateBy(String createBy) {
      this.createBy = createBy;
      return this;
   }

   public LocalDateTime getCreateTime() {
      return createTime;
   }

   public DrpOrderGoods setCreateTime(LocalDateTime createTime) {
      this.createTime = createTime;
      return this;
   }

   public String getUpdateBy() {
      return updateBy;
   }

   public DrpOrderGoods setUpdateBy(String updateBy) {
      this.updateBy = updateBy;
      return this;
   }

   public LocalDateTime getUpdateTime() {
      return updateTime;
   }

   public DrpOrderGoods setUpdateTime(LocalDateTime updateTime) {
      this.updateTime = updateTime;
      return this;
   }
}
