package org.codiki.core.entities.persistence;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="version_revision")
public class VersionRevision implements Serializable {
	private static final long serialVersionUID = 1837590467941917225L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	private String text;
	
	private Boolean bugfix;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "version_id")
	private Version version;

	public Long getId() {
		return id;
	}

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

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Boolean getBugfix() {
		return bugfix;
	}

	public void setBugfix(Boolean bugfix) {
		this.bugfix = bugfix;
	}

	public Version getVersion() {
		return version;
	}

	public void setVersion(Version version) {
		this.version = version;
	}
}
