All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.tmq.common.domain.Authority Maven / Gradle / Ivy

package com.alibaba.tmq.common.domain;

import java.util.Date;

import com.alibaba.tmq.common.constants.Constants;

/**
 * 权限
 * @author tianyao.myc
 *
 */
public class Authority implements Constants {

	public static final int TYPE_TOPIC 		= -1;
	public static final int TYPE_PUBLISHER 	= 0;
	public static final int TYPE_SUBSCRIBER = 1;
	
	/** 唯一自增ID */
	private long id;
	
	/** 创建时间 */
	private Date gmtCreate;
	
	/** 修改时间 */
	private Date gmtModified;
	
	//用户ID
	private String userId;
	
	/** 集群ID */
	private int clusterId;
	
	/** 类型 */
	private int type;
	
	//授权目标ID
	private long targetId;

	public long getId() {
		return id;
	}

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

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public int getClusterId() {
		return clusterId;
	}

	public void setClusterId(int clusterId) {
		this.clusterId = clusterId;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public long getTargetId() {
		return targetId;
	}

	public void setTargetId(long targetId) {
		this.targetId = targetId;
	}

	@Override
	public String toString() {
		return "Authority [id=" + id + ", gmtCreate=" + gmtCreate
				+ ", gmtModified=" + gmtModified + ", userId=" + userId
				+ ", clusterId=" + clusterId + ", type=" + type + ", targetId="
				+ targetId + "]";
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy