package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class MapKalenderToHariLibur
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapKalenderToHariLibur_M")
public class MapKalenderToHariLibur extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectHariLiburFk")
	@NotNull(message = "Kd Hari Libur tidak boleh kosong")

	@Caption(value = "Object Hari Libur")
	private HariLibur hariLibur;

	public void setHariLibur(HariLibur hariLibur) {
		this.hariLibur = hariLibur;
	}

	public HariLibur getHariLibur() {
		return this.hariLibur;
	}

	@Column(name = "ObjectHariLiburFk", insertable = false, updatable = false)
	private Integer hariLiburId;

	@ManyToOne
	@JoinColumn(name = "ObjectTanggalFk")	

	@Caption(value = "Object Tanggal")
	private Kalender tanggal;

	public void setTgl(Kalender tanggal) {
		this.tanggal = tanggal;
	}

	public Kalender getTgl() {
		return this.tanggal;
	}

	@Column(name = "ObjectTanggalFk", insertable = false, updatable = false, nullable = false)
	private Integer tanggalId;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.mapkalendertoharilibur_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.mapkalendertoharilibur_m_id_seq", sequenceName = "public.mapkalendertoharilibur_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

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