package com.gree.mall.manager.enums;

import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import com.gree.mall.manager.enums.base.BaseEnum;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public enum CouponCrowdEnum implements BaseEnum, IEnum<Integer> {

    ALL("0","所有用户"),
    SPECIFY("2","指定用户"),
    ALL_SERVICE("3","所有分销员"),
    ALL_GENRERAL("4","所有普通用户"),;

    @JsonValue
    @EnumValue
    private final String key;
    private final String remark;

    @Override
    public Integer getValue() {
        return Convert.toInt(key);
    }

}
