package com.jsowell.common.enums.parkplatform;

/**
 * 车位锁状态
 */
public enum ParkingLockAlarmEnum {
    ALARM_CLEAR("00", "正常无报警"),
    ARM_MALFUNCTION("55", "摇臂升降异常(未到位)"),
    ARM_DAMAGED("FF", "待机状态摇臂破坏"),
    ;

    private String value;
    private String label;

    ParkingLockAlarmEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static String getLabelByValue(String value) {
        for (ParkingLockAlarmEnum entity : ParkingLockAlarmEnum.values()) {
            if (entity.getValue().equals(value)) {
                return entity.getLabel();
            }
        }
        return "";
    }
}
