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 DataAsuransi
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@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;

	@Column(name = "NoCmFk", insertable = false, updatable = false)
	private Integer pasienId;

	@Column(name = "NoKepesertaan", nullable = false, length = 100)
	@Caption(value = "NoKepesertaan")
	private String noKepesertaan;

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

}