package com.bonus.canteen.core.order.android.vo;

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

public class OrderCallListVO {
   private Long orderId;
   private String mealCode;
   private String custName;
   private Long stallId;
   private String stallName;
   private Integer mealtimeType;
   private Integer orderState;
   private Integer dishesState;
   private Integer orderRefundState;
   private Integer ordState;

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

   public static OrderCallListVO of(OrderListAndroidVO listAndroidVO) {
      OrderCallListVO vo = (OrderCallListVO)BeanUtil.copyProperties(listAndroidVO, OrderCallListVO.class, new String[0]);
      return vo;
   }

   public static OrderCallListVO of(OrderInfo orderInfo, String custName) {
      OrderCallListVO vo = (OrderCallListVO)BeanUtil.copyProperties(orderInfo, OrderCallListVO.class, new String[0]);
      vo.setCustName(custName);
      return vo;
   }

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

   public String getMealCode() {
      return this.mealCode;
   }

   public String getCustName() {
      return this.custName;
   }

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

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

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

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

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

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

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

   public OrderCallListVO setMealCode(final String mealCode) {
      this.mealCode = mealCode;
      return this;
   }

   public OrderCallListVO setCustName(final String custName) {
      this.custName = custName;
      return this;
   }

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

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

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

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

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

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

   public OrderCallListVO setOrdState(final Integer ordState) {
      this.ordState = ordState;
      return this;
   }
}
