package com.ruoyi.common.enums;

import com.ruoyi.common.utils.SecurityUtils;

/**
 * 用户状态
 *
 * @author ruoyi
 */
public enum UserRegStatus
{
    Visitor("游客"), User("用户"), Student("学生");

    private final String info;

    UserRegStatus(String info)
    {
        this.info = info;
    }

    public String getInfo()
    {
        return info;
    }

    public static Boolean isVip() {
        UserRegStatus userRegStatusEnum = SecurityUtils.getLoginUser().getUser().getRegStatus();
        if (null==userRegStatusEnum) {
            return false;
        }

        return UserRegStatus.Student.name().equals(userRegStatusEnum.name());
    }

    public static Boolean isNotVip(){return !isVip();}
}
