package com.jasamedika.medifirst2000.entities;

import java.util.Date;

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.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "SwabAlatPermukaan_M")
public class SwabAlatPermukaan extends BaseMaster {

	@Caption(value = "Tanggal")
	@Column(name = "Tanggal")
	private Date tanggal;

	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Tanggal")
	@JoinColumn(name = "ObjectNamaRuanganFk")
	private Ruangan namaRuangan;

	@Column(name = "ObjectNamaRuanganFk", nullable = true, insertable = false, updatable = false)
	private Integer namaRuanganId;

	@Caption(value = "Jenis Alat")
	@Column(name = "JenisAlat")
	private String jenisAlat;

	@Caption(value = "Hasil Pemeriksaan")
	@Column(name = "HasilPemeriksaan")
	private String hasilPemeriksaan;
	
	@Caption(value = "File Name")
	@Column(name = "FileName")
	private String fileName;

	@Caption(value = "File")
	@Column(name = "File")
	@Type(type = "org.hibernate.type.BinaryType")
	private byte[] file;

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

	public Ruangan getNamaRuangan() {
		return namaRuangan;
	}

	public void setNamaRuangan(Ruangan namaRuangan) {
		this.namaRuangan = namaRuangan;
	}

	public Integer getNamaRuanganId() {
		return namaRuanganId;
	}

	public void setNamaRuanganId(Integer namaRuanganId) {
		this.namaRuanganId = namaRuanganId;
	}

	public String getJenisAlat() {
		return jenisAlat;
	}

	public void setJenisAlat(String jenisAlat) {
		this.jenisAlat = jenisAlat;
	}

	public String getHasilPemeriksaan() {
		return hasilPemeriksaan;
	}

	public void setHasilPemeriksaan(String hasilPemeriksaan) {
		this.hasilPemeriksaan = hasilPemeriksaan;
	}

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

	public Integer getId() {

		return id;
	}

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

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

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

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