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

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

/**
 * class JenisPetugasPelaksana
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "JenisPetugasPelaksana_M")
public class JenisPetugasPelaksana extends BaseMaster {

	@NotNull(message = "Jenis Petugas Pe tidak boleh kosong")
	@Column(name = "JenisPetugasPe", nullable = false, length = 50)
	@Caption(value = "Jenis Petugas Pe")
	private String jenisPetugasPe;

	@NotNull(message = "Kd Jenis Petugas Pe tidak boleh kosong")
	@Column(name = "KdJenisPetugasPe", nullable = false)
	@Caption(value = "Kode Jenis Petugas Pe")
	private Byte kdJenisPetugasPe;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectKomponenHargaFk")
	@Caption(value = "Object Komponen Harga")
	private KomponenHarga komponenHarga;

	@Column(name = "ObjectKomponenHargaFk", insertable = false, updatable = false)
	private Integer komponenHargaId;

	@NotNull(message = "QJenis Petugas Pe tidak boleh kosong")
	@Column(name = "QJenisPetugasPe", nullable = false)
	@Caption(value = "QJenis Petugas Pe")
	private Byte qJenisPetugasPe;

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

}