package com.myeclipseide.examples.myblog.persistence;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Post generated by MyEclipse Persistence Tools
 */
@Entity
@Table(name = "POST", schema = "MYBLOG", uniqueConstraints = {})
public class Post implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	// Fields

	private Integer id;

	private String title;

	private String content;

	private Date posttime;

	// Constructors
	
	public Post() {
		/* default constructor */
	}

	/* minimal constructor */
	public Post(Integer id, String title) {
		this.id = id;
		this.title = title;
	}

	/* full constructor */
	public Post(Integer id, String title, String content, Date posttime) {
		this.id = id;
		this.title = title;
		this.content = content;
		this.posttime = posttime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getId() {
		return this.id;
	}

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

	@Column(name = "TITLE", unique = false, nullable = false, insertable = true, updatable = true, length = 128)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT", unique = false, nullable = true, insertable = true, updatable = true)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "POSTTIME", unique = false, nullable = true, insertable = true, updatable = true, length = 26)
	public Date getPosttime() {
		return this.posttime;
	}

	public void setPosttime(Date posttime) {
		this.posttime = posttime;
	}

}
