package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class GolonganAsuransi
 * 
 * @author Generator
 */
@Entity // @Audited
@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;

	public void setGolonganAsuransi(String golonganAsuransi) {
		this.golonganAsuransi = golonganAsuransi;
	}

	public String getGolonganAsuransi() {
		return this.golonganAsuransi;
	}

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

	public void setKdGolonganAsuransi(Byte kdGolonganAsuransi) {
		this.kdGolonganAsuransi = kdGolonganAsuransi;
	}

	public Byte getKdGolonganAsuransi() {
		return this.kdGolonganAsuransi;
	}

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

	public void setqGolonganAsuransi(Byte qGolonganAsuransi) {
		this.qGolonganAsuransi = qGolonganAsuransi;
	}

	public Byte getqGolonganAsuransi() {
		return this.qGolonganAsuransi;
	}

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

	public void setTotalPremiBulan(Double totalPremiBulan) {
		this.totalPremiBulan = totalPremiBulan;
	}

	public Double getTotalPremiBulan() {
		return this.totalPremiBulan;
	}

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

	public void setTotalPremiTahun(Double totalPremiTahun) {
		this.totalPremiTahun = totalPremiTahun;
	}

	public Double getTotalPremiTahun() {
		return this.totalPremiTahun;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdgolonganasuransi") private Set<AsuransiPasien>
	 * AsuransiPasienSet = new HashSet<AsuransiPasien>();
	 * 
	 * public Set<AsuransiPasien> getAsuransiPasienSet() { return
	 * AsuransiPasienSet; }
	 * 
	 * public void setAsuransiPasienSet(Set<AsuransiPasien> asuransiPasienSet) {
	 * AsuransiPasienSet = asuransiPasienSet; }
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdgolonganasuransi") private Set<HargaPaketPenjamin>
	 * HargaPaketPenjaminSet = new HashSet<HargaPaketPenjamin>();
	 * 
	 * public Set<HargaPaketPenjamin> getHargaPaketPenjaminSet() { return
	 * HargaPaketPenjaminSet; }
	 * 
	 * public void setHargaPaketPenjaminSet(Set<HargaPaketPenjamin>
	 * hargaPaketPenjaminSet) { HargaPaketPenjaminSet = hargaPaketPenjaminSet; }
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdgolonganasuransi") private Set<HargaPaketPenjaminLuarPaket>
	 * HargaPaketPenjaminLuarPaketSet = new
	 * HashSet<HargaPaketPenjaminLuarPaket>();
	 * 
	 * public Set<HargaPaketPenjaminLuarPaket>
	 * getHargaPaketPenjaminLuarPaketSet() { return
	 * HargaPaketPenjaminLuarPaketSet; }
	 * 
	 * public void
	 * setHargaPaketPenjaminLuarPaketSet(Set<HargaPaketPenjaminLuarPaket>
	 * hargaPaketPenjaminLuarPaketSet) { HargaPaketPenjaminLuarPaketSet =
	 * hargaPaketPenjaminLuarPaketSet; }
	 */

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

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}