package com.bonus.canteen.core.order.deprecated.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.bonus.canteen.core.common.constant.MachinePayOnlineEnum;
import com.bonus.canteen.core.common.constant.NuclearModeEnum;
import com.bonus.canteen.core.common.enums.SourceTypeEnum;
import com.bonus.canteen.core.common.utils.CustomConsumModeConverter;
import com.bonus.canteen.core.common.utils.CustomNumberConverter;
import com.bonus.canteen.core.common.utils.CustomYesNoConverter;
import com.bonus.canteen.core.common.utils.PayWriteOffConverter;
import com.bonus.canteen.core.order.deprecated.constants.OrderStateOldEnum;
import com.bonus.canteen.core.pay.common.constants.PayTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Min;
import java.time.LocalDate;
import java.time.LocalDateTime;

/** @deprecated */
@Deprecated
@TableName("ord_app_info")
@ApiModel("小程序订单信息表")
public class OrdAppInfo extends Model<OrdAppInfo> {
   private static final long serialVersionUID = 1L;
   @TableId
   @ApiModelProperty("主键自增")
   private Long id;
   @ApiModelProperty("商家订单号")
   @ExcelProperty(
      value = {"订单号"},
      order = 1
   )
   @NumberFormat("#.####")
   private Long ordId;
   @ApiModelProperty("平台订单号")
   private Long leOrdId;
   @ApiModelProperty("商家总订单号")
   private Long totalOrdId;
   @ApiModelProperty("平台总订单号")
   private Long leTotalOrdId;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("退款订单号")
   private Long refundOrdId;
   @ApiModelProperty("第三方支付订单号")
   @ExcelProperty(
      value = {"第三方订单号"},
      order = 30
   )
   private String thirdPayOrdId;
   @ApiModelProperty("openid 微信公众号、小程序、钉钉等平台的唯一id，支付宝uid（刷脸）")
   private String openid;
   @ApiModelProperty("来源类型 如钉钉、小程序等")
   @ExcelProperty(
      value = {"订单来源"},
      order = 20,
      converter = SourceTypeEnum.ExcelConvertor.class
   )
   private Integer sourceType;
   @ApiModelProperty("档口名称")
   @ExcelProperty(
      value = {"档口"},
      order = 16
   )
   private String shopstallName;
   @ApiModelProperty("档口id")
   private Long shopstallId;
   @ApiModelProperty("档口叫号")
   private String shopstallCallNum;
   @ApiModelProperty("设备编号")
   @ExcelProperty(
      value = {"设备编号"},
      order = 24
   )
   private String mchNum;
   @ApiModelProperty("设备名称")
   @ExcelProperty(
      value = {"设备名称"},
      order = 25
   )
   private String mchName;
   @ApiModelProperty("设备订单号")
   @ExcelProperty(
      value = {"设备订单号"},
      order = 2
   )
   private String macOrdId;
   @ApiModelProperty("核身方式")
   @ExcelProperty(
      value = {"核身方式"},
      order = 27,
      converter = NuclearModeEnum.ExcelConvertor.class
   )
   private Integer nuClearMode;
   @ApiModelProperty("是否在线支付")
   @ExcelProperty(
      value = {"在线离线支付"},
      order = 28,
      converter = MachinePayOnlineEnum.ExcelConvertor.class
   )
   private Integer ifOnline;
   @ApiModelProperty("消费模式")
   @ExcelProperty(
      value = {"消费模式"},
      order = 32,
      converter = CustomConsumModeConverter.class
   )
   private Integer consumMode;
   @ApiModelProperty("设备sn码")
   @ExcelProperty(
      value = {"设备SN码"},
      order = 26
   )
   private String machineSn;
   @ApiModelProperty("订单日期(区别于下单时间)")
   @ExcelProperty(
      value = {"订单日期"},
      order = 3
   )
   private LocalDate ordGoodsDate;
   @ApiModelProperty("下单时间")
   @JSONField(
      format = "yyyy-MM-dd HH:mm:ss"
   )
   @ExcelProperty(
      value = {"下单时间"},
      order = 4
   )
   private LocalDateTime ordTime;
   @ApiModelProperty("补扣日期")
   @ExcelProperty(
      value = {"补扣日期"},
      order = 5
   )
   private LocalDate repairDeductDate;
   @ApiModelProperty("下单人员姓名")
   private String placeOrdName;
   @ApiModelProperty("下单人手机号")
   private String placeOrdMobile;
   @ApiModelProperty("食堂id")
   private Long canteenId;
   @ApiModelProperty("食堂名称")
   @ExcelProperty(
      value = {"食堂"},
      order = 15
   )
   private String canteenName;
   @ApiModelProperty("餐次id")
   private Long intervalId;
   @ApiModelProperty("餐次名称")
   @ExcelProperty(
      value = {"餐次"},
      order = 6
   )
   private String intervalName;
   @ApiModelProperty("餐桌id")
   private Long tableId;
   @ApiModelProperty("优惠券id")
   private String couponId;
   @ApiModelProperty("支付方式 支付宝、微信等")
   @ExcelProperty(
      value = {"支付方式"},
      order = 19,
      converter = PayTypeEnum.ExcelConvertor.class
   )
   private Integer payType;
   @ApiModelProperty("支付状态 1-未支付 2-支付成功 3-支付失败 4-支付关闭 5-申请退款中 6-部分退款 7-退款完成")
   private Integer payState;
   @ApiModelProperty("订单总金额 单位为分")
   @ExcelProperty(
      value = {"订单总金额"},
      order = 17,
      converter = CustomNumberConverter.class
   )
   private @Min(0L) Integer amount;
   @ApiModelProperty("折扣券减免 单位为分")
   private Integer couponReduce;
   @ApiModelProperty("打折减免 单位为分")
   private Integer discountReduce;
   @ApiModelProperty("代金券减免 单位为分")
   private Integer voucherReduce;
   @ApiModelProperty("红包减免 单位为分")
   @ExcelProperty(
      value = {"红包"},
      order = 13,
      converter = CustomNumberConverter.class
   )
   private Integer redEnvelopeReduce;
   @ApiModelProperty("补贴减免 单位为分")
   @ExcelProperty(
      value = {"补贴钱包"},
      order = 11,
      converter = CustomNumberConverter.class
   )
   private Integer subsidyReduce;
   @ApiModelProperty("个人支付 单位为分")
   @ExcelProperty(
      value = {"个人钱包"},
      order = 12,
      converter = CustomNumberConverter.class
   )
   private Integer personalPay;
   @ApiModelProperty("第三方付款金额 单位为分")
   @ExcelProperty(
      value = {"第三方支付"},
      order = 14,
      converter = CustomNumberConverter.class
   )
   private Integer thirdAmount;
   @ApiModelProperty("第三方支付方式 如微信、支付宝、云闪付")
   private Integer thirdPayType;
   @ApiModelProperty("配送费 单位为分")
   private Integer deliveryFee;
   @ApiModelProperty("送达时间")
   private LocalDateTime deliveryTime;
   @ApiModelProperty("实际付款金额 单位为分")
   @ExcelProperty(
      value = {"实际付款金额"},
      order = 18,
      converter = CustomNumberConverter.class
   )
   private Integer realAmount;
   @ApiModelProperty("账户余额 单位为分")
   @ExcelProperty(
      value = {"账户余额"},
      order = 19,
      converter = CustomNumberConverter.class
   )
   private Integer accBal;
   @ApiModelProperty("支付时间")
   @JSONField(
      format = "yyyy-MM-dd HH:mm:ss"
   )
   @ExcelProperty(
      value = {"支付时间"},
      order = 23
   )
   private LocalDateTime payTime;
   private String partPayReason;
   @ApiModelProperty("退款时间")
   private LocalDateTime refundTime;
   @ApiModelProperty("移动支付交易号")
   private String mobilePayTradeNo;
   @ApiModelProperty("外卖标识 1-外卖 2-预订 3-报餐")
   private Integer takeOutFlag;
   @ApiModelProperty("是否打印 1-已打印 2-未打印")
   private Integer ifPrint;
   @ApiModelProperty("是否核销 1-已核销 2-未核销 3-部分核销")
   @ExcelProperty(
      value = {"核销状态"},
      order = 21,
      converter = PayWriteOffConverter.class
   )
   private Integer ifWriteOff;
   @ApiModelProperty("区域id")
   private Long areaId;
   @ApiModelProperty("区域名称")
   private String areaName;
   @ApiModelProperty("取餐柜id")
   private Long counterId;
   @ApiModelProperty("配送员id")
   private Long deliverId;
   @ApiModelProperty("配送方式")
   private Integer deliveryType;
   @ApiModelProperty("配送地址")
   private String deliveryAddr;
   @ApiModelProperty("位置id")
   private Long placeId;
   @ApiModelProperty("订单状态 接受单、拒绝订单、取消、退款、完成")
   @ExcelProperty(
      value = {"订单状态"},
      order = 10,
      converter = OrderStateOldEnum.ExcelConvertor.class
   )
   private Integer ordState;
   private Integer ordRefundState;
   @ApiModelProperty("订单类型 1 食堂  2 商城")
   private Integer ordType;
   @ApiModelProperty("订单备注")
   @ExcelProperty(
      value = {"订单备注"},
      order = 33
   )
   private String remark;
   @ApiModelProperty("取餐码")
   private String mealCode;
   @ApiModelProperty("关联订单id")
   @ExcelProperty(
      value = {"退款关联订单"},
      order = 31
   )
   @NumberFormat("#.####")
   private Long relateOrdId;
   private Integer checkState;
   private String reason;
   private String resressPicurl;
   @ApiModelProperty("是否冲正 1-是 2-否")
   @ExcelProperty(
      value = {"是否冲正"},
      order = 29,
      converter = CustomYesNoConverter.class
   )
   private Integer ifReverse;
   @ApiModelProperty("操作员id")
   private Long operatorId;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @ApiModelProperty("创建人")
   private String crby;
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @ApiModelProperty("更新人")
   private String upby;
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;
   @ApiModelProperty("1 报餐时扣款;2 取餐时扣款")
   private Integer reportMealPayMode;
   @ApiModelProperty("超市下单商品出库记录id")
   private String outId;

   public Long getId() {
      return this.id;
   }

   public Long getOrdId() {
      return this.ordId;
   }

   public Long getLeOrdId() {
      return this.leOrdId;
   }

   public Long getTotalOrdId() {
      return this.totalOrdId;
   }

   public Long getLeTotalOrdId() {
      return this.leTotalOrdId;
   }

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

   public Long getRefundOrdId() {
      return this.refundOrdId;
   }

   public String getThirdPayOrdId() {
      return this.thirdPayOrdId;
   }

   public String getOpenid() {
      return this.openid;
   }

   public Integer getSourceType() {
      return this.sourceType;
   }

   public String getShopstallName() {
      return this.shopstallName;
   }

   public Long getShopstallId() {
      return this.shopstallId;
   }

   public String getShopstallCallNum() {
      return this.shopstallCallNum;
   }

   public String getMchNum() {
      return this.mchNum;
   }

   public String getMchName() {
      return this.mchName;
   }

   public String getMacOrdId() {
      return this.macOrdId;
   }

   public Integer getNuClearMode() {
      return this.nuClearMode;
   }

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

   public Integer getConsumMode() {
      return this.consumMode;
   }

   public String getMachineSn() {
      return this.machineSn;
   }

   public LocalDate getOrdGoodsDate() {
      return this.ordGoodsDate;
   }

   public LocalDateTime getOrdTime() {
      return this.ordTime;
   }

   public LocalDate getRepairDeductDate() {
      return this.repairDeductDate;
   }

   public String getPlaceOrdName() {
      return this.placeOrdName;
   }

   public String getPlaceOrdMobile() {
      return this.placeOrdMobile;
   }

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

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

   public Long getIntervalId() {
      return this.intervalId;
   }

   public String getIntervalName() {
      return this.intervalName;
   }

   public Long getTableId() {
      return this.tableId;
   }

   public String getCouponId() {
      return this.couponId;
   }

   public Integer getPayType() {
      return this.payType;
   }

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

   public Integer getAmount() {
      return this.amount;
   }

   public Integer getCouponReduce() {
      return this.couponReduce;
   }

   public Integer getDiscountReduce() {
      return this.discountReduce;
   }

   public Integer getVoucherReduce() {
      return this.voucherReduce;
   }

   public Integer getRedEnvelopeReduce() {
      return this.redEnvelopeReduce;
   }

   public Integer getSubsidyReduce() {
      return this.subsidyReduce;
   }

   public Integer getPersonalPay() {
      return this.personalPay;
   }

   public Integer getThirdAmount() {
      return this.thirdAmount;
   }

   public Integer getThirdPayType() {
      return this.thirdPayType;
   }

   public Integer getDeliveryFee() {
      return this.deliveryFee;
   }

   public LocalDateTime getDeliveryTime() {
      return this.deliveryTime;
   }

   public Integer getRealAmount() {
      return this.realAmount;
   }

   public Integer getAccBal() {
      return this.accBal;
   }

   public LocalDateTime getPayTime() {
      return this.payTime;
   }

   public String getPartPayReason() {
      return this.partPayReason;
   }

   public LocalDateTime getRefundTime() {
      return this.refundTime;
   }

   public String getMobilePayTradeNo() {
      return this.mobilePayTradeNo;
   }

   public Integer getTakeOutFlag() {
      return this.takeOutFlag;
   }

   public Integer getIfPrint() {
      return this.ifPrint;
   }

   public Integer getIfWriteOff() {
      return this.ifWriteOff;
   }

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

   public String getAreaName() {
      return this.areaName;
   }

   public Long getCounterId() {
      return this.counterId;
   }

   public Long getDeliverId() {
      return this.deliverId;
   }

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

   public String getDeliveryAddr() {
      return this.deliveryAddr;
   }

   public Long getPlaceId() {
      return this.placeId;
   }

   public Integer getOrdState() {
      return this.ordState;
   }

   public Integer getOrdRefundState() {
      return this.ordRefundState;
   }

   public Integer getOrdType() {
      return this.ordType;
   }

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

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

   public Long getRelateOrdId() {
      return this.relateOrdId;
   }

   public Integer getCheckState() {
      return this.checkState;
   }

   public String getReason() {
      return this.reason;
   }

   public String getResressPicurl() {
      return this.resressPicurl;
   }

   public Integer getIfReverse() {
      return this.ifReverse;
   }

   public Long getOperatorId() {
      return this.operatorId;
   }

   public Integer getRevision() {
      return this.revision;
   }

   public String getCrby() {
      return this.crby;
   }

   public LocalDateTime getCrtime() {
      return this.crtime;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

   public Integer getReportMealPayMode() {
      return this.reportMealPayMode;
   }

   public String getOutId() {
      return this.outId;
   }

   public void setId(final Long id) {
      this.id = id;
   }

   public void setOrdId(final Long ordId) {
      this.ordId = ordId;
   }

   public void setLeOrdId(final Long leOrdId) {
      this.leOrdId = leOrdId;
   }

   public void setTotalOrdId(final Long totalOrdId) {
      this.totalOrdId = totalOrdId;
   }

   public void setLeTotalOrdId(final Long leTotalOrdId) {
      this.leTotalOrdId = leTotalOrdId;
   }

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

   public void setRefundOrdId(final Long refundOrdId) {
      this.refundOrdId = refundOrdId;
   }

   public void setThirdPayOrdId(final String thirdPayOrdId) {
      this.thirdPayOrdId = thirdPayOrdId;
   }

   public void setOpenid(final String openid) {
      this.openid = openid;
   }

   public void setSourceType(final Integer sourceType) {
      this.sourceType = sourceType;
   }

   public void setShopstallName(final String shopstallName) {
      this.shopstallName = shopstallName;
   }

   public void setShopstallId(final Long shopstallId) {
      this.shopstallId = shopstallId;
   }

   public void setShopstallCallNum(final String shopstallCallNum) {
      this.shopstallCallNum = shopstallCallNum;
   }

   public void setMchNum(final String mchNum) {
      this.mchNum = mchNum;
   }

   public void setMchName(final String mchName) {
      this.mchName = mchName;
   }

   public void setMacOrdId(final String macOrdId) {
      this.macOrdId = macOrdId;
   }

   public void setNuClearMode(final Integer nuClearMode) {
      this.nuClearMode = nuClearMode;
   }

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

   public void setConsumMode(final Integer consumMode) {
      this.consumMode = consumMode;
   }

   public void setMachineSn(final String machineSn) {
      this.machineSn = machineSn;
   }

   public void setOrdGoodsDate(final LocalDate ordGoodsDate) {
      this.ordGoodsDate = ordGoodsDate;
   }

   public void setOrdTime(final LocalDateTime ordTime) {
      this.ordTime = ordTime;
   }

   public void setRepairDeductDate(final LocalDate repairDeductDate) {
      this.repairDeductDate = repairDeductDate;
   }

   public void setPlaceOrdName(final String placeOrdName) {
      this.placeOrdName = placeOrdName;
   }

   public void setPlaceOrdMobile(final String placeOrdMobile) {
      this.placeOrdMobile = placeOrdMobile;
   }

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

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

   public void setIntervalId(final Long intervalId) {
      this.intervalId = intervalId;
   }

   public void setIntervalName(final String intervalName) {
      this.intervalName = intervalName;
   }

   public void setTableId(final Long tableId) {
      this.tableId = tableId;
   }

   public void setCouponId(final String couponId) {
      this.couponId = couponId;
   }

   public void setPayType(final Integer payType) {
      this.payType = payType;
   }

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

   public void setAmount(final Integer amount) {
      this.amount = amount;
   }

   public void setCouponReduce(final Integer couponReduce) {
      this.couponReduce = couponReduce;
   }

   public void setDiscountReduce(final Integer discountReduce) {
      this.discountReduce = discountReduce;
   }

   public void setVoucherReduce(final Integer voucherReduce) {
      this.voucherReduce = voucherReduce;
   }

   public void setRedEnvelopeReduce(final Integer redEnvelopeReduce) {
      this.redEnvelopeReduce = redEnvelopeReduce;
   }

   public void setSubsidyReduce(final Integer subsidyReduce) {
      this.subsidyReduce = subsidyReduce;
   }

   public void setPersonalPay(final Integer personalPay) {
      this.personalPay = personalPay;
   }

   public void setThirdAmount(final Integer thirdAmount) {
      this.thirdAmount = thirdAmount;
   }

   public void setThirdPayType(final Integer thirdPayType) {
      this.thirdPayType = thirdPayType;
   }

   public void setDeliveryFee(final Integer deliveryFee) {
      this.deliveryFee = deliveryFee;
   }

   public void setDeliveryTime(final LocalDateTime deliveryTime) {
      this.deliveryTime = deliveryTime;
   }

   public void setRealAmount(final Integer realAmount) {
      this.realAmount = realAmount;
   }

   public void setAccBal(final Integer accBal) {
      this.accBal = accBal;
   }

   public void setPayTime(final LocalDateTime payTime) {
      this.payTime = payTime;
   }

   public void setPartPayReason(final String partPayReason) {
      this.partPayReason = partPayReason;
   }

   public void setRefundTime(final LocalDateTime refundTime) {
      this.refundTime = refundTime;
   }

   public void setMobilePayTradeNo(final String mobilePayTradeNo) {
      this.mobilePayTradeNo = mobilePayTradeNo;
   }

   public void setTakeOutFlag(final Integer takeOutFlag) {
      this.takeOutFlag = takeOutFlag;
   }

   public void setIfPrint(final Integer ifPrint) {
      this.ifPrint = ifPrint;
   }

   public void setIfWriteOff(final Integer ifWriteOff) {
      this.ifWriteOff = ifWriteOff;
   }

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

   public void setAreaName(final String areaName) {
      this.areaName = areaName;
   }

   public void setCounterId(final Long counterId) {
      this.counterId = counterId;
   }

   public void setDeliverId(final Long deliverId) {
      this.deliverId = deliverId;
   }

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

   public void setDeliveryAddr(final String deliveryAddr) {
      this.deliveryAddr = deliveryAddr;
   }

   public void setPlaceId(final Long placeId) {
      this.placeId = placeId;
   }

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

   public void setOrdRefundState(final Integer ordRefundState) {
      this.ordRefundState = ordRefundState;
   }

   public void setOrdType(final Integer ordType) {
      this.ordType = ordType;
   }

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

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

   public void setRelateOrdId(final Long relateOrdId) {
      this.relateOrdId = relateOrdId;
   }

   public void setCheckState(final Integer checkState) {
      this.checkState = checkState;
   }

   public void setReason(final String reason) {
      this.reason = reason;
   }

   public void setResressPicurl(final String resressPicurl) {
      this.resressPicurl = resressPicurl;
   }

   public void setIfReverse(final Integer ifReverse) {
      this.ifReverse = ifReverse;
   }

   public void setOperatorId(final Long operatorId) {
      this.operatorId = operatorId;
   }

   public void setRevision(final Integer revision) {
      this.revision = revision;
   }

   public void setCrby(final String crby) {
      this.crby = crby;
   }

   public void setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
   }

   public void setUpby(final String upby) {
      this.upby = upby;
   }

   public void setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
   }

   public void setReportMealPayMode(final Integer reportMealPayMode) {
      this.reportMealPayMode = reportMealPayMode;
   }

   public void setOutId(final String outId) {
      this.outId = outId;
   }

}
