package com.younike.common.enums;

import java.util.Arrays;
import java.util.List;

/**
 * @author chenpengfei
 */
public enum FaultCode {
    OK("0", "无故障"),
    FAULT_1("1", "手动报警"),
    FAULT_2("2", "超速报警"),
    FAULT_3("3", "安全回路故障"),
    FAULT_4("4", "门锁回路故障"),
    FAULT_5("5", "轿门回路故障"),
    FAULT_6("6", "意外震动"),
    FAULT_7("7", "冲顶报警"),
    FAULT_8("8", "蹲底报警"),
    FAULT_9("9", "运行中开门"),
    FAULT_10("10", "困人报警"),
    FAULT_11("11", "开门不到位"),
    FAULT_12("12", "关门不到位"),
    FAULT_13("13", "长时间不关门"),
    FAULT_14("14", "轿厢意外移动"),
    FAULT_15("15", "外部失电（停电）"),
    FAULT_16("16", "后备电池欠电"),
    FAULT_20("20", "超载故障"),
    FAULT_21("21", "机房停电"),
    FAULT_22("22", "限速器动作"),
    FAULT_23("23", "机房温度过高"),
    FAULT_50("50", "电动车进电梯"),
    FAULT_51("51", "煤气罐进电梯");

    private final String code;
    private final String info;

    FaultCode(String code, String info){
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static List<String> getCodeList(){
        return Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "20", "21", "22", "23", "50", "51");
    }
}
