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;

@Getter
@Setter
@Entity
@Table(name = "JenisRespon_M")
public class JenisRespon extends BaseMaster {

	@NotNull(message = "JenisRespon tidak boleh kosong")
	@Column(name = "JenisRespon", nullable = false, length = 100)
	@Caption(value = "JenisRespon")
	private String jeniRespon;

	@NotNull(message = "Kd JenisRespon tidak boleh kosong")
	@Column(name = "KdJenisRespon", nullable = false)
	@Caption(value = "Kode JenisRespon")
	private Byte kdJenisRespon;

	@NotNull(message = "QJenisRespon tidak boleh kosong")
	@Column(name = "QJenisRespon", nullable = false)
	@Caption(value = "QJenisRespon")
	private short qJenisRespon;

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

}
