
package com.tmerclub.cloud.api.order.constant;

/**
 * 订单状态
 * @author tmerclub
 * @date 2020/12/18
 */
public enum PurchaseOrderWaitStatus {

    /**
     * 无需采购
     */
    NOT_PURCHASE(0),
    /**
     * 待采购
     */
    WAIT_PURCHASE(1),

    /**
     * 采购完成
     */
    PURCHASED(2);

    private final Integer num;

    public Integer value() {
        return num;
    }

    PurchaseOrderWaitStatus(Integer num) {
        this.num = num;
    }

    public static PurchaseOrderWaitStatus instance(Integer value) {
        PurchaseOrderWaitStatus[] enums = values();
        for (PurchaseOrderWaitStatus typeEnum : enums) {
            if (typeEnum.value().equals(value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
