package com.yuchen.saas.parking.api.vo.order;

import com.yuchen.saas.parking.api.entity.PmgBatParkBill;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author cxj
 * @create 2023年6月25日15:39:50
 */
@Data
public class OrderManageDetailDto {
    @ApiModelProperty(name = "totalIdleTime", value = "占位时长")
    private long totalIdleTime  = 0L;
    /**
     * 待支付充电对象
     */
    @ApiModelProperty(name = "parkDetail", value = "停车详情")
    private ParkDetail parkDetail;

    @ApiModelProperty(name = "chargeDetailList", value = "收费明细")
    private List<ChargeDetail> chargeDetailList;

    @ApiModelProperty(name = "stationId", value = "充电站id")
    private  Long stationId;

    @ApiModelProperty(name = "billTime", value = "订单时长(分)")
    private  Long billTime;

    @Data
    public static class ParkDetail extends PmgBatParkBill {

        @ApiModelProperty(name = "parkEventList", value = "停车事件集合")
        private List<ParkEvent> parkEventList;

        @ApiModelProperty(name = "parkName", value = "园区名称")
        private String parkName;

        @ApiModelProperty(name = "hiPaidCost", value = "历史已付金额")
        private Long hiPaidCost;

        @ApiModelProperty(name = "hiDiscountCost", value = "历史已使用优惠券")
        private Long hiDiscountCost;

    }

    @Data
    public static class ParkEvent {
        @ApiModelProperty(name = "event", value = "停车事件")
        private String event;

        @ApiModelProperty(name = "time", value = "时间节点")
        private Date time;

        @ApiModelProperty(name = "name", value = "事项地点名称")
        private String name;


    }

    /**
     * 收费明细
     */
    @Data
    public static class ChargeDetail {
        @ApiModelProperty(name = "ruleName", value = "费用项")
        private String ruleName;

        @ApiModelProperty(name = "rate", value = "0按总时长  1按次数  2停车时段  3单位时长  4日夜组合")
        private Long rate;

        @ApiModelProperty(name = "timeFrame", value = "时段")
        private String timeFrame;

        @ApiModelProperty(name = "parkTimeDetail", value = "使用时长()")
        private Long parkTimeDetail;

        @ApiModelProperty(value = "收费金额")
        private Long fee;

        @ApiModelProperty(value = "优惠时长(分钟)")
        private Long discount;

    }




}
