package com.jasamedika.medifirst2000.entities;

import java.util.Date;

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

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

@Entity 
@Table(name="TidurIstirahat_T")
public class TidurIstirahat extends BaseTransaction{
	@ManyToOne
	@JoinColumn(name = "ObjectPasienDaftarFk")
	@NotNull(message="PasienDaftar Harus Diisi")
	@Caption(value="PasienDaftar")
	private AntrianPasienDiPeriksa pasienDaftar;
	
	@Column(name = "ObjectPasienDaftarFk", insertable=false,updatable=false, nullable=false)
	private String pasienDaftarId;

	@NotNull(message = "Tgl Input tidak boleh kosong")
	@Column(name = "tglInput", nullable = false)
	@Caption(value = "Tgl Input")
	private Date tglInput;
	
	@ManyToOne
	@JoinColumn(name = "ObjectLamaTidurFk")
	@NotNull(message="Object LamaTidur Harus Diisi")
	@Caption(value="Object Lama Tidur")
	private StatusLamaTidur lamaTidur;

	@Column(name = "ObjectLamaTidurFk", insertable=false,updatable=false, nullable=false)
	private Integer lamaTidurId;

	public AntrianPasienDiPeriksa getPasienDaftar() {
		return pasienDaftar;
	}

	public void setPasienDaftar(AntrianPasienDiPeriksa pasienDaftar) {
		this.pasienDaftar = pasienDaftar;
	}

	public Date getTglInput() {
		return tglInput;
	}

	public void setTglInput(Date tglInput) {
		this.tglInput = tglInput;
	}

	public StatusLamaTidur getLamaTidur() {
		return lamaTidur;
	}

	public void setLamaTidur(StatusLamaTidur lamaTidur) {
		this.lamaTidur = lamaTidur;
	}
	
}
