package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;

import static javax.persistence.FetchType.LAZY;
import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "K3ItemPeriksaGedung_M")
public class K3ItemPeriksaGedung extends BaseMaster {

	@ManyToOne(fetch = LAZY)
	@Caption(value = "K3 Kelompok Lpj Gedung")
	@JoinColumn(name = "ObjectK3KelompokLpjGedungFK")
	private K3KelompokLpjGedung k3KelompokLpjGedung;

	@Column(name = "ObjectK3KelompokLpjGedungFK", nullable = false, insertable = false, updatable = false)
	private Integer k3KelompokLpjGedungId;

	@Caption(value = "Item Periksa")
	@Column(name = "ItemPeriksa", length = 100, nullable = false)
	private String itemPeriksa;

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

}