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

	@NotNull(message = "Jenis Alamat tidak boleh kosong")
	@Column(name = "JenisAlamat", nullable = false, length = 30)
	@Caption(value = "Jenis Alamat")
	private String jenisAlamat;

	@NotNull(message = "Kd Jenis Alamat tidak boleh kosong")
	@Column(name = "KdJenisAlamat", nullable = false)
	@Caption(value = "Kode Jenis Alamat")
	private Byte kdJenisAlamat;

	@NotNull(message = "QJenis Alamat tidak boleh kosong")
	@Column(name = "QJenisAlamat", nullable = false)
	@Caption(value = "QJenis Alamat")
	private Byte qJenisAlamat;

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

}