package com.jasamedika.medifirst2000.entities;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.base.BaseTransaction;


import javax.validation.constraints.NotNull;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

/**
 *  class DataAsuransi
 * 
 * @author Generator
 */
@Entity //@Audited
@Table(name = "DataAsuransi_T")
public class DataAsuransi  extends BaseMaster{
	@ManyToOne
	@JoinColumn(name = "NoCmFk")
	@NotNull(message="No Rekam medis Harus Diisi")
	@Caption(value="No Rekam Medis")
	private Pasien pasien;

	public void setPasien(Pasien pasien) {
		this.pasien = pasien;
	}

	@Column(name = "NoCm", nullable = false , length = 15)
	public Pasien getPasien(){
		return this.pasien;
	}
	@Column(name = "NoCmFk", insertable=false,updatable=false)
	private Integer pasienId;
	
	@Column(name = "NoKepesertaan", nullable = false , length = 100)
	 @Caption(value = "NoKepesertaan")
	private String noKepesertaan ;
	public String getNoKepesertaan() {
		return noKepesertaan ;
	}
	public void setNoKepesertaan(String noKepesertaan ) {
		this.noKepesertaan  = noKepesertaan ;
	}

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

	public Integer getId() {
		return id;
	}

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