package com.tmerclub.cloud.common.product.constant;

/**
 * @author lanhai
 */
public enum TakeStockSpuStatus {

    /**
     * 盘盈
     */
    PROFIT(1, "盘盈", "PROFIT"),
    /**
     * 盘亏
     */
    LOSS(2, "盘亏", "LOSS"),

    /**
     * 盘平
     */
    EQUAL(0, "盘平", "EQUAL"),
    /**
     * 异常
     */
    EXCEPTION(-1, "异常", "EXCEPTIONAL"),
    ;

    private final Integer num;
    private final String str;
    private final String strEn;

    public Integer value() {
        return num;
    }

    public String str() {
        return str;
    }

    public String strEn() {
        return strEn;
    }

    TakeStockSpuStatus(Integer num, String str, String strEn) {
        this.num = num;
        this.str = str;
        this.strEn = strEn;
    }

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

}
