package com.yunfeiyun.agmp.common.enums;


public enum SpmOrderStatus {

    NO_SEND("0","未发货"),
    SENDING("1","已发货"),
    received("2","已收货"),
    CANCEL("3","取消发货");

    private final String code;
    private final String message;

    SpmOrderStatus(String code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public String getCode()
    {
        return code;
    }

    public String getMessage()
    {
        return message;
    }

    public static String valueOfCode(String code){
        for(SpmOrderStatus spmOrderStatus : SpmOrderStatus.values()) {
            if(spmOrderStatus.code.equals(code)){
                return spmOrderStatus.getMessage();
            }
        }
        return "";
    }

    public boolean equal(String code){
        return this.code.equals(code);
    }
}
