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

	@NotNull(message = "Golongan Asuransi tidak boleh kosong")
	@Column(name = "GolonganAsuransi", nullable = false, length = 20)
	@Caption(value = "Golongan Asuransi")
	private String golonganAsuransi;

	@NotNull(message = "Kd Golongan Asuransi tidak boleh kosong")
	@Column(name = "KdGolonganAsuransi", nullable = false)
	@Caption(value = "Kode Golongan Asuransi")
	private Byte kdGolonganAsuransi;

	@NotNull(message = "QGolongan Asuransi tidak boleh kosong")
	@Column(name = "QGolonganAsuransi", nullable = false)
	@Caption(value = "QGolongan Asuransi")
	private Byte qGolonganAsuransi;

	@Column(name = "TotalPremiBulan")
	@Caption(value = "Total Premi Bulan")
	private Double totalPremiBulan;

	@Column(name = "TotalPremiTahun")
	@Caption(value = "Total Premi Tahun")
	private Double totalPremiTahun;

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

}