package com.gh.gamecenter.db.info;

import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;
import java.util.HashMap;

@DatabaseTable(tableName = "tb_concern")
public class ConcernInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7284046360961851205L;

	@DatabaseField(id = true, columnName = "id")
	private String id;

	@DatabaseField(columnName = "time")
	private long time;

	@DatabaseField(columnName = "gameName")
	private String gameName;

	@DatabaseField(columnName = "icon")
	private String icon;

	@DatabaseField(columnName = "tag")
	private String tag;

	@DatabaseField(columnName = "isConcern")
	private boolean isConcern;

	@DatabaseField(columnName = "isInstalled")
	private boolean isInstalled;

	@DatabaseField(columnName = "installedQuantity")
	private int installedQuantity;

	@DatabaseField(columnName = "packageNames", dataType = DataType.SERIALIZABLE)
	private HashMap<String, Boolean> packageNames;

	@DatabaseField(columnName = "weight")
	private int weight;

	@DatabaseField(columnName = "traffic")
	private long traffic;

	public ConcernInfo() {

	}

	public ConcernInfo(String id, long time, String gameName, String icon,
			String tag, boolean isConcern, boolean isInstalled,
			int installedQuantity, HashMap<String, Boolean> packageNames,
			int weight, long traffic) {
		super();
		this.id = id;
		this.time = time;
		this.gameName = gameName;
		this.icon = icon;
		this.tag = tag;
		this.isConcern = isConcern;
		this.isInstalled = isInstalled;
		this.installedQuantity = installedQuantity;
		this.packageNames = packageNames;
		this.weight = weight;
		this.traffic = traffic;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public String getGameName() {
		return gameName;
	}

	public void setGameName(String gameName) {
		this.gameName = gameName;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public boolean isConcern() {
		return isConcern;
	}

	public void setConcern(boolean isConcern) {
		this.isConcern = isConcern;
	}

	public boolean isInstalled() {
		return isInstalled;
	}

	public void setInstalled(boolean isInstalled) {
		this.isInstalled = isInstalled;
	}

	public int getInstalledQuantity() {
		return installedQuantity;
	}

	public void setInstalledQuantity(int installedQuantity) {
		this.installedQuantity = installedQuantity;
	}

	public HashMap<String, Boolean> getPackageNames() {
		return packageNames;
	}

	public void setPackageNames(HashMap<String, Boolean> packageNames) {
		this.packageNames = packageNames;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public long getTraffic() {
		return traffic;
	}

	public void setTraffic(long traffic) {
		this.traffic = traffic;
	}

	@Override
	public String toString() {
		return "ConcernEntity [id=" + id + ", time=" + time + ", gameName="
				+ gameName + ", icon=" + icon + ", tag=" + tag + ", isConcern="
				+ isConcern + ", isInstalled=" + isInstalled
				+ ", installedQuantity=" + installedQuantity
				+ ", packageNames=" + packageNames + ", weight=" + weight
				+ ", traffic=" + traffic + "]";
	}

}
