package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

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

	@JsonBackReference
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectDraftSuratFk")
	@Caption(value = "DraftSurat")
	private DraftSurat draftSurat;

	@Column(name = "ObjectDraftSuratFk", insertable = false, updatable = false)
	private String draftSuratId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "ruangan")
	private Ruangan ruangan;

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
	private Integer ruanganId;

	@Column(name = "isVerifikasi")
	private Boolean isVerifikasi;

	@Column(name = "fileName")
	@Caption(value = "fileName")
	private String fileName;

	@Column(name = "status")
	private Boolean status;

}
