package com.cool.store.enums;


/**
 * 门店发货阶段枚举
 */
public enum DeliveryPlanStageEnum  {

    PENDING_DELIVERY(1, "待发货"),
    PARTIAL_DELIVERY(2, "部分发货"),
    COMPLETED(3, "已完成");

    private final Integer code;
    private final String desc;

    DeliveryPlanStageEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static DeliveryPlanStageEnum getByCode(Integer code) {
        for (DeliveryPlanStageEnum item : values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }
}