package com.yeejoin.equipmanage.common.enums;
/**
 * <pre>
 *  车载操作枚举
 * </pre>
 *
 */
public enum OnBoardEquipmentEnum {
	
	LOAD("car_load")
	,UNLOAD("car_uninstall");
	
	private String code;
	
	private OnBoardEquipmentEnum(String code) {
		this.setCode(code);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public static OnBoardEquipmentEnum getEnum(String code) {
		OnBoardEquipmentEnum onBoardEquipmentEnum = null;
		for(OnBoardEquipmentEnum type: OnBoardEquipmentEnum.values()) {
			if (type.getCode().equals(code)) {
				onBoardEquipmentEnum = type;
				break;
			}
		}
		
		return onBoardEquipmentEnum;
	}
}
