package com.iformall.enums;

public enum EnumMissTimeType {

    YEAR(1, "年"),
    MONTH(2, "月"),
    PERIOD(3, "周期"),
    OTHER(4, "其他"),
    ;

    public static EnumMissTimeType getEnum(Integer code) {
        for (EnumMissTimeType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumMissTimeType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
