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.google.gson.annotations.Expose;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.helper.Caption;

public class ThtVO extends BaseTransactionVO{
	@ManyToOne
	@NotNull(message = "ObjectantrianPasienDiPeriksaFk tidak boleh kosong")
	@JoinColumn(name = "ObjectantrianPasienDiPeriksaFk")
	@Caption(value = "Object antrianPasienDiPeriksa")
	private AntrianPasienDiPeriksaVO antrianPasienDiPeriksa;

	@Column(name = "ObjectantrianPasienDiPeriksaFk", insertable = false, updatable = false,nullable=true)
	private String antrianPasienDiPeriksaId;
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "tht")
	@Caption(value = "thtData")
	private Set<ThtDataVO> children=new HashSet<ThtDataVO>();
	
	@Column(name = "id", nullable = true, length = 50)
	@Caption(value = "id")
	private Integer id;

	@Column(name = "title", nullable = true, length = 50)
	@Caption(value = "title")
	private String title;

	@Column(name = "image", nullable = true, length = 50)
	@Caption(value = "image")
	private String image;

	public AntrianPasienDiPeriksaVO getAntrianPasienDiPeriksa() {
		return antrianPasienDiPeriksa;
	}

	public void setAntrianPasienDiPeriksa(AntrianPasienDiPeriksaVO antrianPasienDiPeriksa) {
		this.antrianPasienDiPeriksa = antrianPasienDiPeriksa;
	}

	public String getAntrianPasienDiPeriksaId() {
		return antrianPasienDiPeriksaId;
	}

	public void setAntrianPasienDiPeriksaId(String antrianPasienDiPeriksaId) {
		this.antrianPasienDiPeriksaId = antrianPasienDiPeriksaId;
	}

	public Set<ThtDataVO> getChildren() {
		return children;
	}

	public void setChildren(Set<ThtDataVO> children) {
		this.children = children;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public Integer getId() {
		return id;
	}

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