package com.jsowell.common.enums.parkplatform;

/**
 * 车位状态
 */
public enum ParkingStatusEnum {
    NO_VEHICLES("00", "无车辆"),
    PARKED_VEHICLES("FF", "停放车辆"),
    ;

    private String value;
    private String label;

    ParkingStatusEnum(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 (ParkingStatusEnum entity : ParkingStatusEnum.values()) {
            if (entity.getValue().equals(value)) {
                return entity.getLabel();
            }
        }
        return "";
    }
}
