package com.bonus.canteen.core.allocation.canteen.model;

import io.swagger.annotations.ApiModelProperty;
import com.bonus.canteen.core.allocation.canteen.dto.AllocCanteenDeliveryDTO;
import com.bonus.canteen.core.common.enums.DeliveryTypeEnum;

import java.math.BigDecimal;

public class AllocDeliveryCostModel {
   @ApiModelProperty("配送方式")
   private Integer deliveryType;
   @ApiModelProperty("配送名称")
   private String deliveryName;
   @ApiModelProperty("配送费")
   private BigDecimal deliveryAmount;
   @ApiModelProperty("包装费")
   private BigDecimal packingFee;

   public AllocDeliveryCostModel(AllocCanteenDeliveryDTO deliveryDTO) {
      this.deliveryType = deliveryDTO.getDeliveryType();
      this.deliveryName = DeliveryTypeEnum.getDesc(deliveryDTO.getDeliveryType());
      this.deliveryAmount = deliveryDTO.getDeliveryAmount();
      this.packingFee = deliveryDTO.getPackingFee();
   }

   public AllocDeliveryCostModel(Integer deliveryType) {
      this.deliveryType = deliveryType;
      this.deliveryName = DeliveryTypeEnum.getDesc(deliveryType);
   }

   public Integer getDeliveryType() {
      return this.deliveryType;
   }

   public String getDeliveryName() {
      return this.deliveryName;
   }

   public BigDecimal getDeliveryAmount() {
      return this.deliveryAmount;
   }

   public BigDecimal getPackingFee() {
      return this.packingFee;
   }

   public void setDeliveryType(final Integer deliveryType) {
      this.deliveryType = deliveryType;
   }

   public void setDeliveryName(final String deliveryName) {
      this.deliveryName = deliveryName;
   }

   public void setDeliveryAmount(final BigDecimal deliveryAmount) {
      this.deliveryAmount = deliveryAmount;
   }

   public void setPackingFee(final BigDecimal packingFee) {
      this.packingFee = packingFee;
   }

   public AllocDeliveryCostModel() {
   }
}
