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

	@NotNull(message = "Kd Ketunaan Kelainan tidak boleh kosong")
	@Column(name = "KdKetunaanKelainan", nullable = false, length = 5)
	@Caption(value = "Kode Ketunaan Kelainan")
	private String kdKetunaanKelainan;

	@Column(name = "KetunaanKelainan", length = 150)
	@Caption(value = "Ketunaan Kelainan")
	private String ketunaanKelainan;

	@NotNull(message = "QKetunaan Kelainan tidak boleh kosong")
	@Column(name = "QKetunaanKelainan", nullable = false)
	@Caption(value = "QKetunaan Kelainan")
	private short qKetunaanKelainan;

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

}