package com.jasamedika.medifirst2000.vo;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.helper.Caption;

public class VaksinVO extends BaseTransactionVO {
	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@NotNull(message="Pegawai tidak boleh kosong")
	@Caption(value="Pegawai")
	private Pegawai pegawai;
	
	@Column(name = "ObjectPegawaiFk", insertable=false,updatable=false,nullable=false)
	private Integer pegawaiId;
	
	//
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "vaksinVO")
	@Caption(value = "dataVaksinSet")
	private Set<DataVaksinVO> dataVaksinSet=new HashSet<DataVaksinVO>();

	public Pegawai getPegawai() {
		return pegawai;
	}

	public void setPegawai(Pegawai pegawai) {
		this.pegawai = pegawai;
	}

	public Integer getPegawaiId() {
		return pegawaiId;
	}

	public void setPegawaiId(Integer pegawaiId) {
		this.pegawaiId = pegawaiId;
	}

	public Set<DataVaksinVO> getDataVaksinSet() {
		return dataVaksinSet;
	}

	public void setDataVaksinSet(Set<DataVaksinVO> dataVaksinSet) {
		this.dataVaksinSet = dataVaksinSet;
	}

	
	
	
}
