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 java.util.Date;

import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "InputDaftarPaketSeminar_M")
public class InputDaftarPaketSeminar extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectProdukFk")
	@NotNull(message = "Produk tidak boleh kosong")
	@Caption(value = "Produk")
	private Produk produk;

	@Column(name = "ObjectProdukFk", insertable = false, updatable = false)
	private Integer ProdukId;

	@Column(name = "NamaSeminar")
	@Caption(value = "Nama Seminar")
	private String namaSeminar;

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

	@Column(name = "TempatPelatihan")
	@Caption(value = "Tempat Pelatihan")
	private String TempatPelatihan;

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

	@Column(name = "KreditAkreditasiPembicara")
	@Caption(value = "Kredit Akreditasi Pembicara")
	private Integer KreditAkreditasiPembicara;

	@Column(name = "KreditAkreditasiPanitia")
	@Caption(value = "Kredit Akreditasi Panitia")
	private Integer KreditAkreditasiPanitia;

	@Column(name = "KreditAkreditasiPeserta")
	@Caption(value = "Kredit Akreditasi Peserta")
	private Integer KreditAkreditasiPeserta;

	@Column(name = "biayaSeminar")
	@Caption(value = "biaya Seminar")
	private Double biayaSeminar;

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

}
