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.GenerationType.SEQUENCE;

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

	@NotNull(message = "Jenis Paket tidak boleh kosong")
	@Column(name = "JenisPaket", nullable = false, length = 50)
	@Caption(value = "Jenis Paket")
	private String jenisPaket;

	@NotNull(message = "Kd Jenis Paket tidak boleh kosong")
	@Column(name = "KdJenisPaket", nullable = false)
	@Caption(value = "Kode Jenis Paket")
	private Byte kdJenisPaket;

	@ManyToOne
	@JoinColumn(name = "ObjectJenisPaketHeadFk")
	@Caption(value = "Object Jenis Paket Head")
	private JenisPaket jenisPaketHead;

	@Column(name = "ObjectJenisPaketHeadFk", insertable = false, updatable = false)
	private Integer jenisPaketHeadId;

	@NotNull(message = "QJenis Paket tidak boleh kosong")
	@Column(name = "QJenisPaket", nullable = false)
	@Caption(value = "QJenis Paket")
	private Byte qJenisPaket;

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

}