package info.bukova.isspst.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author Pepa Rokos
 */
@Entity
@Table(name = "LIMITS")
public class Limit extends BaseData implements SeasonsAware {

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "WORKGROUP_ID")
	private Workgroup workgroup;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "SEASON_ID")
	private Season season;
	@Column(name = "REQ_LIMIT", precision = 15, scale = 4)
	private BigDecimal limit;

	public Workgroup getWorkgroup() {
		return workgroup;
	}

	public void setWorkgroup(Workgroup workgroup) {
		this.workgroup = workgroup;
	}

	public Season getSeason() {
		return season;
	}

	public void setSeason(Season season) {
		this.season = season;
	}

	public BigDecimal getLimit() {
		return limit;
	}

	public void setLimit(BigDecimal limit) {
		this.limit = limit;
	}
}
