package kr.co.hanwha.hifive.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by sanghoonkwon on 2018. 2. 26..
 */

public enum ProjectEvaluationType {
    NULL(-1),
    /**
     * 평가전
     */
    NONE(200),
    /**
     * 이슈 없음
     */
    GREEN(210),
    /**
     * 이슈 발생
     */
    YELLOW(220),
    /**
     * 보고 필요
     */
    YELLOW_DOUBLE(221),
    /**
     * 종료 예정
     */
    RED(230);

    private int mType;
    private static Map map = new HashMap<>();

    ProjectEvaluationType(int type) {
        mType = type;
    }

    public int getCode() {
        return mType;
    }

    static {
        for (ProjectEvaluationType type : values()) {
            map.put(type.mType, type);
        }
    }

    public static ProjectEvaluationType valueOf(int value) {
        return (ProjectEvaluationType) map.get(value);
    }
}
