package com.hzs.common.core.enums;

import com.hzs.common.core.constant.EnumsPrefixConstants;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 奖衔枚举
 */
@AllArgsConstructor
@Getter
public enum EAwards {

    /**
     * 0=无
     */
    MEMBER(1, 0, "无", 0, EnumsPrefixConstants.AWARDS + 0),
    /**
     * 黄宝
     */
    HEADER(2, 5, "一级", 0, EnumsPrefixConstants.AWARDS + 5),
    /**
     * 绿宝
     */
    MANAGER(3, 10, "二级", 0, EnumsPrefixConstants.AWARDS + 10),
    /**
     * 蓝宝
     */
    HIGH_MANAGER(4, 15, "三级", 0, EnumsPrefixConstants.AWARDS + 15),
    /**
     * 钻石
     */
    SENIOR_MANAGER(5, 20, "四级", 0, EnumsPrefixConstants.AWARDS + 20),
    /**
     * 黄钻
     */
    CHIEF(6, 25, "五级", 0, EnumsPrefixConstants.AWARDS + 25),
    /**
     * 绿钻
     */
    HIGH_CHIEF(7, 30, "六级", 0, EnumsPrefixConstants.AWARDS + 30),
    /**
     * 星耀蓝钻
     */
    SENIOR_CHIEF(8, 35, "七级", 0, EnumsPrefixConstants.AWARDS + 35),
    /**
     * 王者红钻
     */
    CHAIRMAN(9, 40, "八级", 0, EnumsPrefixConstants.AWARDS + 40),
    /**
     * 传奇紫钻
     */
    HONOR_CHAIRMAN(10, 45, "九级", 0, EnumsPrefixConstants.AWARDS + 45),


    /**
     * 10
     */
    GLOBAL_CHAIRMAN(11, 50, "十级", 0, EnumsPrefixConstants.AWARDS + 50),
    /**
     * 11
     */
    LEVEL_ELEVEN(12, 55, "十一级", 0, EnumsPrefixConstants.AWARDS + 55),
    /**
     * 12
     */
    LEVEL_TWELVE(13, 60, "十二级", 0, EnumsPrefixConstants.AWARDS + 60),
    /**
     * 13
     */
    LEVEL_THIRTEEN(14, 65, "十三级", 0, EnumsPrefixConstants.AWARDS + 65),
    /**
     * 14
     */
    LEVEL_FOURTEEN(15, 70, "十四级", 0, EnumsPrefixConstants.AWARDS + 70),
    /**
     * 15
     */
    LEVEL_FIFTEEN(16, 75, "十五级", 0, EnumsPrefixConstants.AWARDS + 75),

    ;

    /**
     * 序号
     */
    private final int index;
    /**
     * 实际值
     */
    private final int value;

    /**
     * 显示标签
     */
    private final String label;
    /**
     * 是否启用（0=是,1=否） -- 来源EYesNo
     */
    private final int enable;
    /**
     * 国际化翻译key值
     */
    private final String key;

    public static String getAwardsLabel(int value) {
        for (EAwards eAwards : EAwards.values()) {
            if (eAwards.value == value) {
                return eAwards.label;
            }
        }
        return "";
    }
}
