package com.qs.mp.common.enums;

import com.baomidou.mybatisplus.annotation.IEnum;
import io.swagger.annotations.ApiModel;

/**
 * 奖级标签枚举类
 *
 * @author Cup
 * @date 2022/5/23
 */
@ApiModel("奖级标签枚举类")
public enum AwardsLabelEnum implements IEnum<String> {

    LABEL_ONE("传说", "v2/cs.png"),
    LABEL_TWO("史诗", "v2/ss.png"),
    LABEL_THREE("稀有", "v2/xy.png"),
    LABEL_FOUR("尊贵", "v2/zg.png");

    private final String value;
    private final String picUrl;

    AwardsLabelEnum(String value, String picUrl) {
        this.value = value;
        this.picUrl = picUrl;
    }

    public String getPicUrl() {
        return picUrl;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    public static AwardsLabelEnum getByValue(String value){
        for (AwardsLabelEnum awardsLabelEnum : AwardsLabelEnum.values()) {
            if (awardsLabelEnum.getValue().equals(value)) {
                return awardsLabelEnum;
            }
        }
        return null;
    }
}
