package com.bonus.core.report.bill.vo;

import cn.hutool.core.bean.BeanUtil;
import com.bonus.core.report.bill.model.ReportOrderChannelBill;
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;

@ApiModel("账单明细")
public class BillDetailVO {
   @ApiModelProperty("三方平台订单号")
   private String orderNo;
   @ApiModelProperty("小牛发起交易单号")
   private String merOrderNo;
   @ApiModelProperty("订单日期")
   private LocalDate orderDate;
   @ApiModelProperty("交易时间")
   private LocalDateTime orderTime;
   @ApiModelProperty("支付总金额")
   private BigDecimal shouldAmt;
   @ApiModelProperty("实付总金额")
   private BigDecimal actualAmt;
   @ApiModelProperty("优惠总金额")
   private BigDecimal discountableAmt;
   @ApiModelProperty("退款总金额")
   private BigDecimal refundAmt;
   @ApiModelProperty("平台费率")
   private BigDecimal feeRate;
   @ApiModelProperty("平台手续费")
   private BigDecimal fee;
   @ApiModelProperty("渠道费率")
   private BigDecimal channelFeeRate;
   @ApiModelProperty("渠道手续费")
   private BigDecimal channelFee;
   @ApiModelProperty("交易类型")
   private Integer tradeType;
   @ApiModelProperty("交易状态")
   private Integer tradeState;
   @ApiModelProperty("用户标识")
   private String openId;
   @ApiModelProperty("支付方式")
   private Integer payType;
   @ApiModelProperty("支付渠道")
   private Integer payChannel;
   @ApiModelProperty("账单生成时间")
   private LocalDateTime updateTime;
   @ApiModelProperty("食堂id（启用食堂独立配置时用）")
   private Long canteenId;

   public static List<BillDetailVO> from(List<ReportOrderChannelBill> bills) {
      return BeanUtil.copyToList(bills, BillDetailVO.class);
   }

   public ReportOrderChannelBill convertToReportOrderChannelBill() {
      return (ReportOrderChannelBill)BeanUtil.copyProperties(this, ReportOrderChannelBill.class, new String[0]);
   }

   public String getOrderNo() {
      return this.orderNo;
   }

   public String getMerOrderNo() {
      return this.merOrderNo;
   }

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

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

   public BigDecimal getShouldAmt() {
      return this.shouldAmt;
   }

   public BigDecimal getActualAmt() {
      return this.actualAmt;
   }

   public BigDecimal getDiscountableAmt() {
      return this.discountableAmt;
   }

   public BigDecimal getRefundAmt() {
      return this.refundAmt;
   }

   public BigDecimal getFeeRate() {
      return this.feeRate;
   }

   public BigDecimal getFee() {
      return this.fee;
   }

   public BigDecimal getChannelFeeRate() {
      return this.channelFeeRate;
   }

   public BigDecimal getChannelFee() {
      return this.channelFee;
   }

   public Integer getTradeType() {
      return this.tradeType;
   }

   public Integer getTradeState() {
      return this.tradeState;
   }

   public String getOpenId() {
      return this.openId;
   }

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

   public Integer getPayChannel() {
      return this.payChannel;
   }

   public LocalDateTime getUpdateTime() {
      return this.updateTime;
   }

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

   public void setOrderNo(final String orderNo) {
      this.orderNo = orderNo;
   }

   public void setMerOrderNo(final String merOrderNo) {
      this.merOrderNo = merOrderNo;
   }

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

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

   public void setShouldAmt(final BigDecimal shouldAmt) {
      this.shouldAmt = shouldAmt;
   }

   public void setActualAmt(final BigDecimal actualAmt) {
      this.actualAmt = actualAmt;
   }

   public void setDiscountableAmt(final BigDecimal discountableAmt) {
      this.discountableAmt = discountableAmt;
   }

   public void setRefundAmt(final BigDecimal refundAmt) {
      this.refundAmt = refundAmt;
   }

   public void setFeeRate(final BigDecimal feeRate) {
      this.feeRate = feeRate;
   }

   public void setFee(final BigDecimal fee) {
      this.fee = fee;
   }

   public void setChannelFeeRate(final BigDecimal channelFeeRate) {
      this.channelFeeRate = channelFeeRate;
   }

   public void setChannelFee(final BigDecimal channelFee) {
      this.channelFee = channelFee;
   }

   public void setTradeType(final Integer tradeType) {
      this.tradeType = tradeType;
   }

   public void setTradeState(final Integer tradeState) {
      this.tradeState = tradeState;
   }

   public void setOpenId(final String openId) {
      this.openId = openId;
   }

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

   public void setPayChannel(final Integer payChannel) {
      this.payChannel = payChannel;
   }

   public void setUpdateTime(final LocalDateTime updateTime) {
      this.updateTime = updateTime;
   }

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

}
