package com.jsowell.common.enums.ykc;

/**
 * 充电枪口数据库状态
 */
public enum PileConnectorDataBaseStatusEnum {

	OFF_NETWORK("0", "离线"),
	FREE("1", "空闲"),
	OCCUPIED_NOT_CHARGED("2", "占用（未充电）"),
	OCCUPIED_CHARGING("3", "占用（充电中）"),
	OCCUPIED_APPOINTMENT_LOCK("4", "占用（预约锁定）"),
	FAULT("255", "故障")
	;

	private String value;
	private String 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;
	}

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

	public static String getStatusDescription(String value) {
		for (PileConnectorDataBaseStatusEnum statusEnum : PileConnectorDataBaseStatusEnum.values()) {
			if (statusEnum.getValue().equals(value)) {
				return statusEnum.getLabel();
			}
		}
		return "";
	}
}
