package com.jasamedika.medifirst2000.entities;

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

@Entity
@Table(name = "Tht_t")
public class Tht extends BaseTransaction{
	@ManyToOne
	@JoinColumn(name = "ObjectantrianPasienDiPeriksaFk")
	@Caption(value = "Object antrianPasienDiPeriksa")
	private AntrianPasienDiPeriksa antrianPasienDiPeriksa;

	@Column(name = "ObjectantrianPasienDiPeriksaFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false,nullable=true)
	private String antrianPasienDiPeriksaId;
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "tht")
	@Caption(value = "thtData")
	private Set<ThtData> children=new HashSet<ThtData>();
	
	@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 AntrianPasienDiPeriksa getAntrianPasienDiPeriksa() {
		return antrianPasienDiPeriksa;
	}
	public void setAntrianPasienDiPeriksa(AntrianPasienDiPeriksa antrianPasienDiPeriksa) {
		this.antrianPasienDiPeriksa = antrianPasienDiPeriksa;
	}
	public Set<ThtData> getChildren() {
		return children;
	}
	public void setChildren(Set<ThtData> 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 String getAntrianPasienDiPeriksaId() {
		return antrianPasienDiPeriksaId;
	}
	public void setAntrianPasienDiPeriksaId(String antrianPasienDiPeriksaId) {
		this.antrianPasienDiPeriksaId = antrianPasienDiPeriksaId;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	
}
