package org.magcruise.citywalk.model.row;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.magcruise.citywalk.model.relation.EntriesTable;

import net.sf.persist.annotations.Column;
import net.sf.persist.annotations.Table;

@Table(name = EntriesTable.TABLE_NAME)
public class Entry {

	private String id;
	private String userId;
	private String courseId;
	private Date createdAt;

	public Entry() {
	}

	public Entry(String userId, String courseId, Date createdAt) {
		this.userId = userId;
		this.courseId = courseId;
		this.createdAt = createdAt;
	}

	@Column(autoGenerated = true)
	public String getId() {
		return id;
	}

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

	public String getUserId() {
		return userId;
	}

	public void setUserId(String id) {
		this.userId = id;
	}

	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String groupId) {
		this.courseId = groupId;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date created) {
		this.createdAt = created;
	}

}
