package com.bonus.core.order.mq.po;

import cn.hutool.core.bean.BeanUtil;
import com.bonus.core.order.common.constants.OrderStateMixEnum;
import com.bonus.core.order.common.model.OrderInfo;
import com.bonus.core.order.deprecated.constants.OrderStateOldEnum;

public class OrderDishesStateUpdatePO {
   private String traceId;
   private Long tenantId;
   private Long orderId;
   private Long canteenId;
   private String canteenName;
   private Long stallId;
   private String stallName;
   private Integer orderType;
   private Integer orderState;
   private Integer payState;
   private Integer orderRefundState;
   private Integer dishesState;
   private Integer dishesStateBeforeUpdated;
   private Integer oldOrderState;
   private Integer orderStateMix;

   public Integer getOldOrderState() {
      return OrderStateOldEnum.convertByNewOrderState(this.orderState, this.orderRefundState, this.dishesState);
   }

   public Integer getOrderStateMix() {
      return OrderStateMixEnum.mixStateBy(this.orderState, this.payState, this.orderRefundState);
   }

   public static OrderDishesStateUpdatePO of(OrderInfo orderInfo) {
      OrderDishesStateUpdatePO po = (OrderDishesStateUpdatePO)BeanUtil.copyProperties(orderInfo, OrderDishesStateUpdatePO.class, new String[0]);
      return po;
   }

   public String getTraceId() {
      return this.traceId;
   }

   public Long getTenantId() {
      return this.tenantId;
   }

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

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

   public String getCanteenName() {
      return this.canteenName;
   }

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

   public String getStallName() {
      return this.stallName;
   }

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

   public Integer getOrderState() {
      return this.orderState;
   }

   public Integer getPayState() {
      return this.payState;
   }

   public Integer getOrderRefundState() {
      return this.orderRefundState;
   }

   public Integer getDishesState() {
      return this.dishesState;
   }

   public Integer getDishesStateBeforeUpdated() {
      return this.dishesStateBeforeUpdated;
   }

   public void setTraceId(final String traceId) {
      this.traceId = traceId;
   }

   public void setTenantId(final Long tenantId) {
      this.tenantId = tenantId;
   }

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

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

   public void setCanteenName(final String canteenName) {
      this.canteenName = canteenName;
   }

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

   public void setStallName(final String stallName) {
      this.stallName = stallName;
   }

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

   public void setOrderState(final Integer orderState) {
      this.orderState = orderState;
   }

   public void setPayState(final Integer payState) {
      this.payState = payState;
   }

   public void setOrderRefundState(final Integer orderRefundState) {
      this.orderRefundState = orderRefundState;
   }

   public void setDishesState(final Integer dishesState) {
      this.dishesState = dishesState;
   }

   public void setDishesStateBeforeUpdated(final Integer dishesStateBeforeUpdated) {
      this.dishesStateBeforeUpdated = dishesStateBeforeUpdated;
   }

   public void setOldOrderState(final Integer oldOrderState) {
      this.oldOrderState = oldOrderState;
   }

   public void setOrderStateMix(final Integer orderStateMix) {
      this.orderStateMix = orderStateMix;
   }

}
