package com.ruoyi.bst.order.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.ruoyi.bst.suit.domain.vo.SuitIntervalFeeRule;
import com.ruoyi.bst.suit.domain.vo.SuitStartFeeRule;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 订单对象 bst_order
 *
 * @author ruoyi
 * @date 2025-03-24
 */
@Data
public class Order extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "订单号")
    @ApiModelProperty("订单号")
    private String no;

    @Excel(name = "运营区ID")
    @ApiModelProperty("运营区ID")
    private Long areaId;

    @Excel(name = "运营区所属用户ID")
    @ApiModelProperty("运营区所属用户ID")
    private Long areaUserId;

    @Excel(name = "运营区所属代理ID")
    @ApiModelProperty("运营区所属代理ID")
    private Long areaAgentId;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "支付成功的支付单ID")
    @ApiModelProperty("支付成功的支付单ID")
    private Long payId;

    @Excel(name = "支付金额")
    @ApiModelProperty("支付金额")
    private BigDecimal payAmount;

    @Excel(name = "押金")
    @ApiModelProperty("押金")
    private BigDecimal depositFee;

    @Excel(name = "应收总金额")
    @ApiModelProperty("应收总金额")
    private BigDecimal totalFee;

    @Excel(name = "应收调度费")
    @ApiModelProperty("应收调度费（停车点外）")
    private BigDecimal dispatchFee;

    @Excel(name = "应收管理费")
    @ApiModelProperty("应收管理费（运营区外）")
    private BigDecimal manageFee;

    @Excel(name = "应收骑行费")
    @ApiModelProperty("应收骑行费")
    private BigDecimal ridingFee;

    @Excel(name = "应收车损费")
    @ApiModelProperty("应收车损费")
    private BigDecimal deductionFee;

    @Excel(name = "备注")
    @ApiModelProperty("备注")
    private String mark;

    @Excel(name = "订单时长", readConverterExp = "秒=")
    @ApiModelProperty("订单时长")
    private Long duration;

    @Excel(name = "距离", readConverterExp = "米=")
    @ApiModelProperty("距离")
    private BigDecimal distance;

    @Excel(name = "状态", readConverterExp = "W=AIT_PAY待支付,P=ROCESSING进行中,F=INISHED已结束,C=ANCEL已取消")
    @ApiModelProperty("状态")
    private String status;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("开始时间")
    private LocalDateTime startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("结束时间")
    private LocalDateTime endTime;

    @Excel(name = "还车类型", readConverterExp = "1=正常还车,2=辅助还车")
    @ApiModelProperty("还车类型")
    private String returnType;

    @Excel(name = "通话录音")
    @ApiModelProperty("通话录音")
    private String audioFiles;

    @Excel(name = "套餐ID")
    @ApiModelProperty("套餐ID")
    private Long suitId;

    @Excel(name = "套餐类型")
    @ApiModelProperty("套餐类型")
    private String suitType;

    @Excel(name = "套餐名称")
    @ApiModelProperty("套餐名称")
    private String suitName;

    @Excel(name = "套餐免费骑行时长(分钟)")
    @ApiModelProperty("套餐免费骑行时长(分钟)")
    private Integer suitFreeRideTime;

    @Excel(name = "套餐租赁单位")
    @ApiModelProperty("套餐租赁单位")
    private String suitRentalUnit;

    @Excel(name = "套餐计费规则 ")
    @ApiModelProperty("套餐计费规则 ")
    private String suitRidingRule;

    @Excel(name = "套餐起步价计费规则json")
    @ApiModelProperty("套餐起步价计费规则json")
    private SuitStartFeeRule suitStartRule;

    @Excel(name = "套餐区间计费规则json")
    @ApiModelProperty("套餐区间计费规则json")
    private List<SuitIntervalFeeRule> suitIntervalRule;

    @Excel(name = "取消备注")
    @ApiModelProperty("取消备注")
    private String cancelRemark;

    @Excel(name = "支付超时时间")
    @ApiModelProperty("支付超时时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payExpireTime;

    @Excel(name = "最大可用时间")
    @ApiModelProperty("最大可用时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime maxTime;

    @Excel(name = "套餐时长(秒)")
    @ApiModelProperty("套餐时长(秒)")
    private Long suitSeconds;

    @Excel(name = "开始子区域ID")
    @ApiModelProperty("开始子区域ID")
    private Long startAreaSubId;

    @Excel(name = "开始子区域名称")
    @ApiModelProperty("开始子区域名称")
    private String startAreaSubName;

    @Excel(name = "结束子区域名称")
    @ApiModelProperty("结束子区域名称")
    private String endAreaSubName;

    @Excel(name = "结束原因")
    @ApiModelProperty("结束原因")
    private String endReason;

    @Excel(name = "当前订单设备ID")
    @ApiModelProperty("当前订单设备ID")
    private Long orderDeviceId;

    @Excel(name = "运营区是否开启还车审核")
    @ApiModelProperty("运营区是否开启还车审核")
    private Boolean areaReturnVerify;

    @Excel(name = "审核备注")
    @ApiModelProperty("审核备注")
    private String verifyRemark;

    @ApiModelProperty("实收金额")
    private BigDecimal actualAmount;

    @Excel(name = "实收骑行费")
    @ApiModelProperty("实收骑行费")
    private BigDecimal actualRidingFee;

    @Excel(name = "实收调度费") 
    @ApiModelProperty("实收调度费")
    private BigDecimal actualDispatchFee;

    @Excel(name = "实收管理费")
    @ApiModelProperty("实收管理费") 
    private BigDecimal actualManageFee;

    @Excel(name = "实收车损费")
    @ApiModelProperty("实收车损费")
    private BigDecimal actualDeductionFee;

    @Excel(name = "套餐是否自动押金抵扣")
    @ApiModelProperty("套餐是否自动押金抵扣")
    private Boolean suitDepositDeduction;

    @Excel(name = "订单版本号")
    @ApiModelProperty("订单版本号") 
    private Integer version;

    @Excel(name = "支付方式")
    @ApiModelProperty("支付方式（1押金抵扣 2用户支付）")
    private String payType;

    @Excel(name = "押金抵扣金额")
    @ApiModelProperty("押金抵扣金额")
    private BigDecimal depositDeductionAmount;
    
    @Excel(name = "骑行支付ID")
    @ApiModelProperty("骑行支付ID")
    private Long ridePayId;

    @Excel(name = "是否已经自动退款")
    @ApiModelProperty("是否已经自动退款")
    private Boolean autoRefunded;

    @Excel(name = "人工退款次数")
    @ApiModelProperty("人工退款次数")
    private Integer adminRefundCount;

    @Excel(name = "人工退款金额")
    @ApiModelProperty("人工退款金额")
    private BigDecimal adminRefundAmount;

    @Excel(name = "骑行支付时间/押金抵扣时间")
    @ApiModelProperty("骑行支付时间/押金抵扣时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime ridePayTime;

    @Excel(name = "是否改过价")
    @ApiModelProperty("是否改过价")
    private Boolean priceChanged;

    @Excel(name = "骑行费退款")
    @ApiModelProperty("骑行费退款")
    private BigDecimal ridingRefund;

    @Excel(name = "调度费退款") 
    @ApiModelProperty("调度费退款")
    private BigDecimal dispatchRefund;

    @Excel(name = "管理费退款")
    @ApiModelProperty("管理费退款")
    private BigDecimal manageRefund;

    @Excel(name = "车损费退款")
    @ApiModelProperty("车损费退款")
    private BigDecimal deductionRefund;

    @Excel(name = "用户卡券ID")
    @ApiModelProperty("用户卡券ID") 
    private Long vipUserId;

    @Excel(name = "骑行费优惠")
    @ApiModelProperty("骑行费优惠")
    private BigDecimal ridingDiscount;

    @Excel(name = "卡券类型")
    @ApiModelProperty("卡券类型")
    private String vipType;

    @Excel(name = "卡券优惠值") 
    @ApiModelProperty("卡券优惠值")
    private BigDecimal vipDiscountValue;

    @Excel(name = "卡券名称")
    @ApiModelProperty("卡券名称")
    private String vipName;

    @Excel(name = "是否挂账")
    @ApiModelProperty("是否挂账") 
    private Boolean isCredit;

    @Excel(name = "挂账方ID")
    @ApiModelProperty("挂账方ID")
    private Long creditId;

    @Excel(name = "挂账用户ID")
    @ApiModelProperty("挂账用户ID")
    private Long creditUserId;

    @Excel(name = "挂账方名称")
    @ApiModelProperty("挂账方名称")
    private String creditName;  

    @Excel(name = "挂账用户名称")
    @ApiModelProperty("挂账用户名称")
    private String creditUserName;
   
}
