package com.cim.idm.constants;

import lombok.Getter;

@Getter
public enum MaturingEnums {
    NOT_MATURED("01", "不熟化"),
    NORMAL_TEMPERATURE("02", "常温"),
    LOW_TEMPERATURE("03", "低温"),
    MODERATE_TEMPERATURE("04", "中温"),
    HIGH_TEMPERATURE("05", "高温");

    private final String code;
    private final String info;

    MaturingEnums(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getMaturing(String code) {
        for (MaturingEnums value : MaturingEnums.values()) {
            if (value.getCode().equals(code)) {
                return value.getInfo();
            }
        }
        return MaturingEnums.NOT_MATURED.getCode();
    }
}
