package com.qs.mp.common.enums;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.compress.utils.Lists;

/**
 * 用户类型
 * @author zhongcp
 * @Date 2021/9/1
 */
public enum RoleTypeEnum {
	
	  SYS_ROLE("1", "系统角色"),
	  CHANNEL_ROLE("2", "渠道商角色"),
	  SALESITE_ROLE("3", "经销商角色");
	

	  private String value;
	  private String desc;

	  public String getValue() {
	    return value;
	  }

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

	  public String getDesc() {
	    return desc;
	  }

	  public void setDesc(String desc) {
	    this.desc = desc;
	  }

	  private RoleTypeEnum(String value, String desc) {
	    this.value = value;
	    this.desc = desc;
	  }
	  
	  public static List<Map<String, String>> toList() {
        List<Map<String, String>> list = Lists.newArrayList();
        for (RoleTypeEnum item : RoleTypeEnum.values()) {
            Map<String, String> map = new HashMap<String, String>();
            map.put("value", item.getValue());
            map.put("desc", item.getDesc());
            list.add(map);
        }
        return list;
      }
}
