package com.jwipc.spe.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum EvaluationCycleType {
    /**
     * 年度
     */
    YEAR(1, "年度"),
    /**
     * 季度
     */
    QUARTER(2, "季度"),
    /**
     * 月度
     */
    MONTH(3, "月度");

    private final int value;
    private final String title;

    EvaluationCycleType(int value, String title) {
        this.value = value;
        this.title = title;
    }

    public  static EvaluationCycleType forValue(int val) {
        for (EvaluationCycleType evaluationCycleType : values()) {
            if (val == evaluationCycleType.getValue()) {
                return evaluationCycleType;
            }
        }
        return null;
    }

}
