package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

import static javax.persistence.FetchType.LAZY;

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

	@Caption(value = "File")
	@Column(name = "file")
	private byte[] file;

	@Caption(value = "File Tape")
	@Column(name = "fileTape")
	private String fileTape;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "noRegistrasiFk")
	private AntrianPasienDiPeriksa noRegistrasi;

	@Column(name = "noRegistrasiFk", insertable = false, updatable = false, nullable = false)
	private String noRegistrasiId;

}
