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 KelompokTindakanMedis
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "KelompokTindakanMedis_M")
public class KelompokTindakanMedis extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message = "Kd Departemen tidak boleh kosong")
	@Caption(value = "Object Departemen")
	private Departemen departemen;

	@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
	private Integer departemenId;

	@NotNull(message = "Kd Kelompok T M tidak boleh kosong")
	@Column(name = "KdKelompokTM", nullable = false)
	@Caption(value = "Kode Kelompok T M")
	private Byte kdKelompokTM;

	@NotNull(message = "Kelompok T M tidak boleh kosong")
	@Column(name = "KelompokTM", nullable = false, length = 30)
	@Caption(value = "Kelompok T M")
	private String kelompokTM;

	@NotNull(message = "QKelompok T M tidak boleh kosong")
	@Column(name = "QKelompokTM", nullable = false)
	@Caption(value = "QKelompok T M")
	private Byte qKelompokTM;

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

}