package com.data.bean;

import java.util.Map;

public class GroupMemberBean extends BaseBean{
	public int	groupId;
	public int	parentId;
	public int	partnerLev;
	public int	lev;
	public int	ban;
	public int	top_time;
	public int	join_time;
	public int	last_time;
	public int	permission;
	public int  score;

	public int queueid=0; //分组号用于幸运号看到对应的用户分组号
	public int seeid; //幸运号看到的分组id

	public GroupMemberBean(int gid) {
		this.groupId = gid;
	}
	
	public void fillData(Map<String,String> map) {
		if(map.isEmpty()) {
			this.del = true;
			return;
		}
		int opt = Integer.parseInt(map.get("opt"));
		if(opt!=1) {
			this.del = true;
			return;
		}
		this.id = Integer.parseInt(map.get("uid"));
		this.parentId = Integer.parseInt(map.get("parentId"));
		this.partnerLev = Integer.parseInt(map.get("partnerLev"));
		this.lev = Integer.parseInt(map.get("lev"));
		this.ban = Integer.parseInt(map.get("ban"));
		this.top_time = Integer.parseInt(map.get("top_time"));
		this.join_time = Integer.parseInt(map.get("join_time"));
		if(map.containsKey("last_time")) {
			this.last_time = Integer.parseInt(map.get("last_time"));
		}
		if(map.containsKey("permission")) {
			this.permission = Integer.parseInt(map.get("permission"));
		}
		if(map.containsKey("score")) {
			this.score = Integer.parseInt(map.get("score"));
		}

		if(map.containsKey("queueid")) {
			this.queueid = Integer.parseInt(map.get("queueid"));
		}

		if(map.containsKey("seeid")) {
			this.seeid = Integer.parseInt(map.get("seeid"));
		}

	}
}
