package com.bonus.core.marketing.v2.rule.price.dto;

import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import com.bonus.core.marketing.v2.rule.meal.dto.RulePriceSimpleDTO;

@ApiModel("计价规则入参-订单列表")
public class RulePriceOrderDTO {
   @ApiModelProperty("订单id")
   private Long orderId;
   @ApiModelProperty("设备订单id")
   private String macOrderId;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("订单类型")
   private Integer orderType;
   @ApiModelProperty("设备sn码")
   private String deviceSn;
   @ApiModelProperty("餐次类型")
   private Integer mealtimeType;
   @ApiModelProperty("订单日期")
   private LocalDate orderDate;
   @ApiModelProperty("下单时间")
   private LocalDateTime orderTime;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("档口id")
   private Long stallId;
   @ApiModelProperty("应付金额  分")
   private BigDecimal payableAmount;
   @ApiModelProperty("是否在线订单 1 是 2 否")
   private Integer ifOnline;
   @ApiModelProperty("订单明细")
   private List<RulePriceOrderDetailDTO> details;
   @ApiModelProperty("预留字段")
   private JsonNode extInfo;

   public RulePriceOrderDTO(RulePriceSimpleDTO simpleDTO) {
      this.custId = simpleDTO.getCustId();
      this.orderType = simpleDTO.getOrderType();
      this.deviceSn = simpleDTO.getDeviceSn();
      this.orderDate = simpleDTO.getOrderDate();
      this.canteenId = simpleDTO.getCanteenId();
      this.stallId = simpleDTO.getStallId();
      this.ifOnline = simpleDTO.getIfOnline();
   }

   public Long getOrderId() {
      return this.orderId;
   }

   public String getMacOrderId() {
      return this.macOrderId;
   }

   public Long getCustId() {
      return this.custId;
   }

   public Integer getOrderType() {
      return this.orderType;
   }

   public String getDeviceSn() {
      return this.deviceSn;
   }

   public Integer getMealtimeType() {
      return this.mealtimeType;
   }

   public LocalDate getOrderDate() {
      return this.orderDate;
   }

   public LocalDateTime getOrderTime() {
      return this.orderTime;
   }

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

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

   public BigDecimal getPayableAmount() {
      return this.payableAmount;
   }

   public Integer getIfOnline() {
      return this.ifOnline;
   }

   public List<RulePriceOrderDetailDTO> getDetails() {
      return this.details;
   }

   public JsonNode getExtInfo() {
      return this.extInfo;
   }

   public RulePriceOrderDTO setOrderId(final Long orderId) {
      this.orderId = orderId;
      return this;
   }

   public RulePriceOrderDTO setMacOrderId(final String macOrderId) {
      this.macOrderId = macOrderId;
      return this;
   }

   public RulePriceOrderDTO setCustId(final Long custId) {
      this.custId = custId;
      return this;
   }

   public RulePriceOrderDTO setOrderType(final Integer orderType) {
      this.orderType = orderType;
      return this;
   }

   public RulePriceOrderDTO setDeviceSn(final String deviceSn) {
      this.deviceSn = deviceSn;
      return this;
   }

   public RulePriceOrderDTO setMealtimeType(final Integer mealtimeType) {
      this.mealtimeType = mealtimeType;
      return this;
   }

   public RulePriceOrderDTO setOrderDate(final LocalDate orderDate) {
      this.orderDate = orderDate;
      return this;
   }

   public RulePriceOrderDTO setOrderTime(final LocalDateTime orderTime) {
      this.orderTime = orderTime;
      return this;
   }

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

   public RulePriceOrderDTO setStallId(final Long stallId) {
      this.stallId = stallId;
      return this;
   }

   public RulePriceOrderDTO setPayableAmount(final BigDecimal payableAmount) {
      this.payableAmount = payableAmount;
      return this;
   }

   public RulePriceOrderDTO setIfOnline(final Integer ifOnline) {
      this.ifOnline = ifOnline;
      return this;
   }

   public RulePriceOrderDTO setDetails(final List<RulePriceOrderDetailDTO> details) {
      this.details = details;
      return this;
   }

   public RulePriceOrderDTO setExtInfo(final JsonNode extInfo) {
      this.extInfo = extInfo;
      return this;
   }


   public RulePriceOrderDTO(final Long orderId, final String macOrderId, final Long custId, final Integer orderType, final String deviceSn, final Integer mealtimeType, final LocalDate orderDate, final LocalDateTime orderTime, final Long canteenId, final Long stallId, final BigDecimal payableAmount, final Integer ifOnline, final List<RulePriceOrderDetailDTO> details, final JsonNode extInfo) {
      this.orderId = orderId;
      this.macOrderId = macOrderId;
      this.custId = custId;
      this.orderType = orderType;
      this.deviceSn = deviceSn;
      this.mealtimeType = mealtimeType;
      this.orderDate = orderDate;
      this.orderTime = orderTime;
      this.canteenId = canteenId;
      this.stallId = stallId;
      this.payableAmount = payableAmount;
      this.ifOnline = ifOnline;
      this.details = details;
      this.extInfo = extInfo;
   }

   public RulePriceOrderDTO() {
   }
}
