package com.ruoyi.common.core.enums;

import lombok.Getter;

/**
 * 用户状态
 * 
 * @author ruoyi
 */
@Getter
public enum UserType
{
    SYSTEM("00", "系统用户", "管理平台"), WEBSITE("10", "门户用户", "网站"), DATA_REPORT("20", "数据上报用户", "数据上报平台");

    private final String code;
    private final String info;
    private final String desc;

    UserType(String code, String info, String desc)
    {
        this.code = code;
        this.info = info;
        this.desc = desc;
    }

    public static String getDesc(String code) {
    	for (UserType type : UserType.values()) {
    		if (type.getCode().equals(code)) {
    			return type.getDesc();
    		}
    	}
    	return "";
    }
}
