package com.ruoyi.xq.enums.syspush;

import lombok.Getter;

@Getter
public enum SystemPushGroupIdEnum {
    // 群体类型: 0=单个用户,1=全部用户,2=男用户,3=女用户, 4 =认证女神
    ONE_USER(0,"单个用户"),
    ALL_USER(1,"全部用户"),
    MEN_USER(2,"男用户"),
    WOMEN_USER(3,"女用户"),
    ANCHOR_USER(4,"认证女神"),
    ;
    private final Integer code;
    private final String text;

    SystemPushGroupIdEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    public static SystemPushGroupIdEnum getByCode(Integer groupId) {
        SystemPushGroupIdEnum[] values = SystemPushGroupIdEnum.values();
        for (SystemPushGroupIdEnum value : values) {
            if(value.getCode().equals(groupId)){
                return value;
            }
        }
        return null;
    }
}
