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

import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 车位占用费详情，包含收费为 0 的场景
 *
 * @author 钱江
 * @date 2022/9/28 下午4:25
 * @version 2.0.0
 */
@Data
public class ChargePlaceIdleCostDetailsVo {

    // 总收取金额
    private long totalAmount = 0L;

    // 充电车位停放总时长
    private long totalParkingTime = 0L;

    // 充电车位停放不充电总时长
    private long totalIdleTime = 0L;

    // 充电总时长
    private long totalChargeTime = 0L;

    // 详情
    private Map<String, List<PlaceCostFragment>> fragments = new HashMap<>();

    // 详情
    private List<PlaceCostFragment> PlaceCostFragments =new ArrayList<>();


    @Data
    public static class PlaceCostFragment {

        // 停车状态（ 1 = 进入， 0 = 离开 ）
        private Integer placeStatus;

        private Integer stakeType;

        private String placeId;
        // 单位收取费用
        private long amountUnit;

        // 收费时间单位
        private long timeUnit;

        // 收取费用
        private long amount;

        // 车位停车时长
        private long parkingTime;

        // 车位充电时长
        private long chargeTime;

        // 车位闲置占用时长
        private long idleTime;

        // 入位时间
        private String startTime;

        // 出位时间
        private String endTime;

        //电桩id
        private Long chargeTerminalId;

        // 充电订单记录
        private List<ChargeOrderRecord> chargeOrderRecords;
    }

    @Data
    public static class ChargeOrderRecord {
        // 入位时间
        private String startTime;
        // 出位时间
        private String endTime;
        //电桩id
        private String terminalId;
        //电桩名称
        private String terminalName;
        //充电订单id
        private String chargeBillId;
        //电站id
        private String chargeStationId;
        //电站名称
        private String chargeStationName;
        //充电时长
        private Integer chargeDuration;
        //快慢充类型
        private Integer stakeType;
        //private Integer chargeDuration;
    }
}
