package com.izouma.nineth.enums;

public enum ItemType {
    PERPETUAL_CERTIFICATE("指定铸造者优先购凭证"),
    CONSUMABLE_CERTIFICATE("消耗性全局优先购凭证"),//全平台
    CONSUMABLE_ASSIGN_CERTIFICATE("消耗性指定藏品优先购凭证"),//指定藏品
    SURPRISE_BOX("惊喜盒子");

    private final String description;

    ItemType(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 获取类型
     * @param ordinal
     * @return
     */
    public static ItemType getValue(int ordinal) {
        for (ItemType o :values()){
            if (o.ordinal()==ordinal){
                return o;
            }
        }
        return null;
    }
}
