package com.bonus.canteen.core.kitchen.domain.constants;

public enum SampleCabinetActionTypeEnum {
    NOT_APPROVE(1, "菜品放入"),
    APPROVE(2, "菜品取出"),
    NOT_APPROVE_AGAIN(3, "无操作");

    private final Integer key;
    private final String desc;

    private SampleCabinetActionTypeEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }
    public Integer getKey() {
        return this.key;
    }

    public String getDesc() {
        return this.desc;
    }

    public static String getDescByKey(Integer targetKey) {
        for (SampleCabinetActionTypeEnum cabinetActionTypeEnum : SampleCabinetActionTypeEnum.values()) {
            if (cabinetActionTypeEnum.getKey().equals(targetKey)) {
                return cabinetActionTypeEnum.getDesc();
            }
        }
        return "";
    }
}
