package com.jasamedika.medifirst2000.entities;

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 org.hibernate.annotations.Type;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name="FileDirectory")
public class FileDirectory extends BaseTransaction{

	@Caption(value = "File")
	@Type(type = "org.hibernate.type.BinaryType")
	@Column(name="file")
	private byte[] file;
	
	@Caption(value = "File Tape")
	@Column(name="fileTape")
	private String fileTape;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="noRegistrasiFk")
	private AntrianPasienDiPeriksa noRegistrasi;
	
	@Column(name="noRegistrasiFk", insertable=false, updatable=false, nullable=false)
	private String noRegistrasiId;

	public byte[] getFile() {
		return file;
	}

	public void setFile(byte[] file) {
		this.file = file;
	}

	public String getFileTape() {
		return fileTape;
	}

	public void setFileTape(String fileTape) {
		this.fileTape = fileTape;
	}

	public AntrianPasienDiPeriksa getNoRegistrasi() {
		return noRegistrasi;
	}

	public void setNoRegistrasi(AntrianPasienDiPeriksa noRegistrasi) {
		this.noRegistrasi = noRegistrasi;
	}

	public String getNoRegistrasiId() {
		return noRegistrasiId;
	}

	public void setNoRegistrasiId(String noRegistrasiId) {
		this.noRegistrasiId = noRegistrasiId;
	}

}
