package com.persagy.functions.weather.constant;

public enum EnumHolidayDayType {
	WORK_DAY(0, "正常工作日"),
	WEEK_DAY(1, "法定节假日"),
	REST_DAY(2, "节假日调休补班");
	private int code;
	private String descrip;
	
	EnumHolidayDayType(int code, String descrip) {
		this.code = code;
		this.descrip = descrip;
	}

	public int getCode() {
		return code;
	}

	public String getDescrip() {
		return descrip;
	}
	
	public static EnumHolidayDayType getEnum(int code) {
		EnumHolidayDayType enumItem = null;
		for(EnumHolidayDayType enumObj : EnumHolidayDayType.values()) {
			if(code == enumObj.getCode()) {
				enumItem = enumObj;
				break;
			}
		}
		
		return enumItem;
	}
}
