package com.reyun.saas.common.constants;

/**
 * trackingio中复制
 * desc:角色类型
 */
public enum RoleEnumType {

    SUPER_USER(0, "主账号"),
    MANAGER(1, "管理员"),
    SUB_APP_MANAGER(2, "子应用管理员"),
    CUSTOM_AUTH(3, "普通账号");


    private Integer key;
    private String value;
    private String names[] = {"主账号", "管理员", "子应用管理员", "普通账号", "普通账号", "渠道账号"};


    RoleEnumType(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getRoleName(Integer key) {
        return names[Integer.valueOf(key.toString())];
    }
}
