package com.jsowell.common.enums.ykc;

/**
 * order_basic_info表 order_status字段
 * 订单状态(0-未启动；1-充电中；2-待结算；3-待补缴；4-异常；5-可疑；6-订单完成；7-超时关闭)
 */
public enum OrderStatusEnum {

	NOT_START("0", "未启动"),
	IN_THE_CHARGING("1", "充电中"),
	STAY_SETTLEMENT("2", "待结算"),
	STAY_RETROACTIVE_AMOUNT("3", "待补缴"),
	ABNORMAL("4", "异常"),
	SUSPICIOUS("5", "可疑"),
	ORDER_COMPLETE("6", "订单完成"),
	ORDER_CLOSE_TIMEOUT("7", "超时关闭"),
	;

	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;
	}

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

	public static String getOrderStatus(String value) {
		for (OrderStatusEnum orderStatusEnum : OrderStatusEnum.values()) {
			if (orderStatusEnum.getValue().equals(value)) {
				return orderStatusEnum.getLabel();
			}
		}
		return "";
	}
}
