package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class PelayananProfile
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "PelayananProfile_M")
public class PelayananProfile extends BaseMaster {
	@Column(name = "HariBukaDlmMinggu", nullable = true, length = 75)
	@Caption(value = "Hari Buka Dlm Minggu")
	private String hariBukaDlmMinggu;

	public void setHariBukaDlmMinggu(String hariBukaDlmMinggu) {
		this.hariBukaDlmMinggu = hariBukaDlmMinggu;
	}

	public String getHariBukaDlmMinggu() {
		return this.hariBukaDlmMinggu;
	}

	@Column(name = "JamBukaDlmHari", nullable = true, length = 150)
	@Caption(value = "Jam Buka Dlm Hari")
	private String jamBukaDlmHari;

	public void setJamBukaDlmHari(String jamBukaDlmHari) {
		this.jamBukaDlmHari = jamBukaDlmHari;
	}

	public String getJamBukaDlmHari() {
		return this.jamBukaDlmHari;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectJenisPelayananProfileFk")
	@NotNull(message = "Kd Jenis Pelayanan Profile tidak boleh kosong")

	@Caption(value = "Object Jenis Pelayanan Profile")
	private JenisPelayananProfile jenisPelayananProfile;

	public void setJenisPelayananProfile(JenisPelayananProfile jenisPelayananProfile) {
		this.jenisPelayananProfile = jenisPelayananProfile;
	}

	public JenisPelayananProfile getJenisPelayananProfile() {
		return this.jenisPelayananProfile;
	}

	@Column(name = "ObjectJenisPelayananProfileFk", insertable = false, updatable = false)
	private Integer jenisPelayananProfileId;

	@NotNull(message = "Kd Pelayanan Profile tidak boleh kosong")
	@Column(name = "KdPelayananProfile", nullable = false, length = 3)
	@Caption(value = "Kode Pelayanan Profile")
	private String kdPelayananProfile;

	public void setKdPelayananProfile(String kdPelayananProfile) {
		this.kdPelayananProfile = kdPelayananProfile;
	}

	public String getKdPelayananProfile() {
		return this.kdPelayananProfile;
	}

	@NotNull(message = "Pelayanan Profile tidak boleh kosong")
	@Column(name = "PelayananProfile", nullable = false, length = 75)
	@Caption(value = "Pelayanan Profile")
	private String pelayananProfile;

	public void setPelayananProfile(String pelayananProfile) {
		this.pelayananProfile = pelayananProfile;
	}

	public String getPelayananProfile() {
		return this.pelayananProfile;
	}

	@NotNull(message = "QPelayanan Profile tidak boleh kosong")
	@Column(name = "QPelayananProfile", nullable = false)
	@Caption(value = "QPelayanan Profile")
	private short qPelayananProfile;

	public void setqPelayananProfile(short qPelayananProfile) {
		this.qPelayananProfile = qPelayananProfile;
	}

	public short getqPelayananProfile() {
		return this.qPelayananProfile;
	}

	@Column(name = "QtyBukaDlmMinggu", nullable = true)
	@Caption(value = "Qty Buka Dlm Minggu")
	private Byte qtyBukaDlmMinggu;

	public void setqtyBukaDlmMinggu(Byte qtyBukaDlmMinggu) {
		this.qtyBukaDlmMinggu = qtyBukaDlmMinggu;
	}

	public Byte getqtyBukaDlmMinggu() {
		return this.qtyBukaDlmMinggu;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdpelayananprofile") private Set<KasusPenyakit>
	 * KasusPenyakitSet = new HashSet<KasusPenyakit>();
	 * 
	 * public Set<KasusPenyakit> getKasusPenyakitSet() { return
	 * KasusPenyakitSet; }
	 * 
	 * public void setKasusPenyakitSet(Set<KasusPenyakit> kasusPenyakitSet) {
	 * KasusPenyakitSet = kasusPenyakitSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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