package com.njcn.pojo.user;

import com.njcn.sso.pojo.user.User;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * PQS_RoleGp角色组表。增加PQS_RoleGp表，用于把角色分组，然后用户直接跟角色组进行绑定。
 * */
@Table(name="PQS_ROLEGP")
public class RoleGroup {

	@Id
	@Column(name="ROLEGP_INDEX")
	private String roleGpIndex;

	@Column(name="ROLEGPNAME")
	private String roleGpName;

	@Column(name="USER_INDEX")
	private String userIndex;

	@Column(name="UPDATETIME")
	private Date updateTime;

	@Column(name="ROLEGP_DESCRIPTION")
	private String rolegpDescription;

	@Transient
	private User uID;

	private Integer state;

	public String getRoleGpIndex() {
		return roleGpIndex;
	}

	public void setRoleGpIndex(String roleGpIndex) {
		this.roleGpIndex = roleGpIndex;
	}

	public String getRoleGpName() {
		return roleGpName;
	}

	public void setRoleGpName(String roleGpName) {
		this.roleGpName = roleGpName;
	}

	public String getUserIndex() {
		return userIndex;
	}

	public void setUserIndex(String userIndex) {
		this.userIndex = userIndex;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getRolegpDescription() {
		return rolegpDescription;
	}

	public void setRolegpDescription(String rolegpDescription) {
		this.rolegpDescription = rolegpDescription;
	}

	public User getuID() {
		return uID;
	}

	public void setuID(User uID) {
		this.uID = uID;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Override
	public String toString() {
		return "RoleGroup{" +
				"roleGpIndex='" + roleGpIndex + '\'' +
				", roleGpName='" + roleGpName + '\'' +
				", userIndex='" + userIndex + '\'' +
				", updateTime=" + updateTime +
				", rolegpDescription='" + rolegpDescription + '\'' +
				", uID=" + uID +
				", state=" + state +
				'}';
	}
}
