package com.jasamedika.medifirst2000.entities;

import java.util.HashSet;
import java.util.Set;

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

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

@Entity //@Audited
@Table(name = "PeralatanDetail_T")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class PeralatanDetail extends BaseTransaction {
	
	@ManyToOne
	@JoinColumn(name = "PeralatanFk")
	@NotNull(message = "Peralatan tidak boleh kosong")
	private Peralatan peralatan ;
	
	@Column(name = "PeralatanFk", insertable = false, updatable = false)
	private Integer peralatanId;
	
	@ManyToOne
	@JoinColumn(name = "TransferPasienInternalFk", nullable=true)	
	private TransferPasienInternal transferPasienInternal;
	
	@Column(name = "TransferPasienInternalFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String transferPasienInternalId;
	
	@ManyToOne
	@JoinColumn(name = "TransferPasienExsternalFk", nullable=true)	
	private TransferPasienExsternal transferPasienExsternal;
	
	@Column(name = "TransferPasienExsternalFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String transferPasienExsternalId;
	
	@NotNull(message = "Is Nilai tidak boleh kosong")
	@Column(name = "isNilai")
	@Caption(value = "Is Nilai")
	private Boolean isNilai;	
	

	public Peralatan getPeralatan() {
		return peralatan;
	}

	public void setPeralatan(Peralatan peralatan) {
		this.peralatan = peralatan;
	}

	public Boolean getIsNilai() {
		return isNilai;
	}

	public void setIsNilai(Boolean isNilai) {
		this.isNilai = isNilai;
	}	

	public TransferPasienInternal getTransferPasienInternal() {
		return transferPasienInternal;
	}

	public void setTransferPasienInternal(TransferPasienInternal transferPasienInternal) {
		this.transferPasienInternal = transferPasienInternal;
	}

	public Integer getPeralatanId() {
		return peralatanId;
	}

	public void setPeralatanId(Integer peralatanId) {
		this.peralatanId = peralatanId;
	}

	public String getTransferPasienInternalId() {
		return transferPasienInternalId;
	}

	public void setTransferPasienInternalId(String transferPasienInternalId) {
		this.transferPasienInternalId = transferPasienInternalId;
	}

	public TransferPasienExsternal getTransferPasienExsternal() {
		return transferPasienExsternal;
	}

	public void setTransferPasienExsternal(TransferPasienExsternal transferPasienExsternal) {
		this.transferPasienExsternal = transferPasienExsternal;
	}

	public String getTransferPasienExsternalId() {
		return transferPasienExsternalId;
	}

	public void setTransferPasienExsternalId(String transferPasienExsternalId) {
		this.transferPasienExsternalId = transferPasienExsternalId;
	}	
	
	
	
}
