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

public enum WasteDealTypeEnum {
    DISCARD(1, "丢弃"),
    NEXT_MEAL_USE(2, "下一餐使用"),
    COLLECT_SELLING(3, "集中售卖");

    private final Integer key;

    private final String desc;

    private WasteDealTypeEnum(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 (WasteDealTypeEnum dealTypeEnum : WasteDealTypeEnum.values()) {
            if (dealTypeEnum.getKey().equals(targetKey)) {
                return dealTypeEnum.getDesc();
            }
        }
        return "";
    }
}
