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 = "Komunikasi_M")
public class Komunikasi extends BaseMaster {

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

	@NotNull(message = "Kd Komunikasi tidak boleh kosong")
	@Column(name = "KdKomunikasi", nullable = false)
	@Caption(value = "Kode Komunikasi")
	private Byte kdKomunikasi;

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

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

}
