// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package dk.vajhoej.forum.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Post {
	private String author;
	private Date time;
	private String title;
	private String body;
	private List<Comment> comments;
	private List<Post> versions;
	public Post(String author, String title, String body) {
		this(author, new Date(), title, body);
	}
	public Post(String author, Date time, String title, String body) {
		this.author = author;
		this.time = time;
		this.title = title;
		this.body = body;
		this.comments = new ArrayList<Comment>();
		this.versions = new ArrayList<Post>();
	}
	public String getAuthor() {
		return author;
	}
	public Date getTime() {
		return time;
	}
	public String getTitle() {
		return title;
	}
	public String getBody() {
		return body;
	}
	public List<Comment> getComments() {
		return comments;
	}
	public List<Post> getVersions() {
		return versions;
	}
}
