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 javax.validation.constraints.NotNull;

import static javax.persistence.FetchType.LAZY;

/**
 * class DetailRencanaOperasi
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "DetailRencanaOperasi_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class DetailRencanaOperasi extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "RencanaOperasi")
	@Caption(value = "Rencana Operasi")
	private RencanaOperasi rencanaOperasi;

	@Column(name = "RencanaOperasi", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String rencanaOperasiId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "PegawaiFk")
	@NotNull(message = "Pegawai Harus Diisi")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

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

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

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "JenisPelaksanaFk")
	@NotNull(message = "Jenis Pelaksana Harus Diisi")
	@Caption(value = "Jenis Pelaksana")
	private JenisPetugasPelaksana jenisPelaksana;

	@Column(name = "JenisPelaksanaFk", insertable = false, updatable = false)
	private Integer jenisPelaksanaId;

}