package com.palmnest.model.estateserve;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.springframework.security.core.GrantedAuthority;

/**
 * This class is used to represent available roles in the database.
 *
 * @author <a href="mailto:chasel.java@gmail.com">Chasel Li</a>
 */
@Entity
@Table(name = "tb_template_library")
public class TemplateLibrary implements Serializable {

	private static final long serialVersionUID = 3690197650654049848L;

	private int    id;
	private String type;
	private int    organizationId;
	private String templateId;
	private String templateContent;
	private Date   createTime;
	private String creator;


	public String getType() {
		return type;
	}

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

	public int getOrganizationId() {
		return organizationId;
	}

	public void setOrganizationId(int organizationId) {
		this.organizationId = organizationId;
	}

	public String getTemplateId() {
		return templateId;
	}

	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}

	public String getTemplateContent() {
		return templateContent;
	}

	public void setTemplateContent(String templateContent) {
		this.templateContent = templateContent;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

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

	@Override
	public String toString() {
		return "TemplateLibrary [id=" + id + ", type=" + type + ", organizationId=" + organizationId + ", templateId="
				+ templateId + ", templateContent=" + templateContent + ", createTime=" + createTime + ", creator="
				+ creator + "]";
	}


}
