package com.github.piotr_rusin.yule.entity;

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 org.hibernate.annotations.CreationTimestamp;

/**
 * A class representing blog posts.
 * 
 * @author Piotr Rusin <piotr.rusin88@gmail.com>
 */
@Entity
@Table(name="posts")
public class Post {
	@Id
	@Column(name="id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;

	private String title;

	private String slug;

	private String content;

	@Column(name="creation_date")
	@CreationTimestamp
	private Date creationDate;

	public int getId() {
		return id;
	}

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

	public String getTitle() {
		return title;
	}

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

	public String getSlug() {
		return slug;
	}

	public void setSlug(String slug) {
		this.slug = slug;
	}

	public String getContent() {
		return content;
	}

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

	public Date getCreationDate() {
		return creationDate;
	}


}

@@ -321,16 +321,66 @@
 mestamp;
+%0Aimport org.hibernate.annotations.UpdateTimestamp;
 %0A%0A/**%0A *
@@ -766,16 +766,102 @@
 nDate;%0A%0A
+%09@Column(name=%22modification_date%22)%0A%09@UpdateTimestamp%0A%09private Date modificationDate;%0A%0A
 %09public 
@@ -1342,11 +1342,78 @@
 te;%0A%09%7D%0A%0A
+%09public Date getModificationDate() %7B%0A%09%09return modificationDate;%0A%09%7D%0A
 %0A%7D%0A

Add modificationDate field to Post class