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.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "ParameterCheckSanitasi_M")
public class ParameterCheckSanitasi extends BaseMaster {

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

	@JsonBackReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "parameterCheckSanitasi")
	private Set<ParameterCheckSanitasiDetail> parameterCheckSanitasiDetail = new HashSet<>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<ParameterCheckSanitasiDetail> getParameterCheckSanitasiDetail() {
		return parameterCheckSanitasiDetail;
	}

	public void setParameterCheckSanitasiDetail(Set<ParameterCheckSanitasiDetail> parameterCheckSanitasiDetail) {
		this.parameterCheckSanitasiDetail = parameterCheckSanitasiDetail;
	}

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

	public Integer getId() {

		return id;
	}

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