package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.FetchType.LAZY;

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

	@ManyToOne(fetch = LAZY)
	@JsonIgnoreProperties(value = { "handler", "hibernateLazyInitializer" })
	@JoinColumn(name = "ObjectPegawaiFk")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false)
	private Integer pegawaiId;

	@ManyToOne
	@JoinColumn(name = "ObjectShiftKerjaFk")
	@Caption(value = "Shift Kerja")
	private ShiftKerja shiftKerja;

	@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false)
	private Integer shiftKerjaId;

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

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Ruangan")
	private Ruangan ruangan;

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

}
