package org.dromara.elevator.domain.vo;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 故障图表VO
 *
 * @author ym
 * @version 1.0.0
 * @date 2024-09-04 16:32
 */
@Data
public class EFaultStatisticsChartVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 统计列表数据
     */
    private List<FaultStatisticsInfo> statisticsList;

    /**
     * 故障类型
     */
    private List<String> faultNameList;

    /**
     * 电梯数
     */
    private List<Integer> faultTotalList;

    public EFaultStatisticsChartVo() {
        this.statisticsList = new ArrayList<>();
        this.faultNameList = new ArrayList<>();
        this.faultTotalList = new ArrayList<>();
    }

    @Data
    public static class FaultStatisticsInfo {
        /**
         * 故障编号
         */
        private String faultCode;
        /**
         * 故障名称
         */
        private String faultName;
        /**
         * 电梯数量
         */
        private Integer elevatorTotal;
        /**
         * 故障次数
         */
        private Integer faultTotal;

        public FaultStatisticsInfo() {
            this.elevatorTotal = 0;
            this.faultTotal = 0;
        }
    }

}
