package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;import org.hibernate.envers.Audited;
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 DiagnosaTindakan
 * 
 * @author Generator
 */
@Entity //@Audited
@Table(name = "DiagnosaTindakan_M")
public class DiagnosaTindakan extends BaseMaster {
	
	@NotNull(message="Kode Diagnosa Tindakan tidak boleh kosong")
	@Column(name = "KdDiagnosaTindakan", nullable = false , length = 5)
	@Caption(value="Kode Diagnosa Tindakan")
	private String kdDiagnosaTindakan;
	
	
	public String getKdDiagnosaTindakan() {
		return kdDiagnosaTindakan;
	}

	public void setKdDiagnosaTindakan(String kdDiagnosaTindakan) {
		this.kdDiagnosaTindakan = kdDiagnosaTindakan;
	}

	@Caption(value="Diagnosa Tindakan")
	private String namaDiagnosaTindakan;

	@NotNull(message="Diagnosa Tindakan tidak boleh kosong")
	@Column(name = "DiagnosaTindakan", nullable = false , length = 150)
	public String getNamaDiagnosaTindakan() {
		return namaDiagnosaTindakan;
	}



	
	public void setNamaDiagnosaTindakan(String namaDiagnosaTindakan) {
		this.namaDiagnosaTindakan = namaDiagnosaTindakan;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectDiagnosaTindakanFk")
	@NotNull(message="Kd Diagnosa Tindakan tidak boleh kosong")

	@Caption(value="Object Diagnosa Tindakan")
	private Diagnosa diagnosaTindakan;

	public void setDiagnosaTindakan(Diagnosa diagnosaTindakan) {
		this.diagnosaTindakan = diagnosaTindakan;
	}


	public Diagnosa getDiagnosaTindakan(){
		return this.diagnosaTindakan;
	}

	@Column(name = "ObjectDiagnosaTindakanFk", insertable=false,updatable=false)
	private Integer diagnosaTindakanId;

	@ManyToOne
	@JoinColumn(name = "ObjectKategoryDiagnosaFk")
	@NotNull(message="Kd Kategory Diagnosa tidak boleh kosong")

	@Caption(value="Object Kategory Diagnosa")
	private KategoryDiagnosa kategoryDiagnosa;

	public void setKategoryDiagnosa(KategoryDiagnosa kategoryDiagnosa) {
		this.kategoryDiagnosa = kategoryDiagnosa;
	}


	public KategoryDiagnosa getKategoryDiagnosa(){
		return this.kategoryDiagnosa;
	}

	@Column(name = "ObjectKategoryDiagnosaFk", insertable=false,updatable=false,nullable=false)
	private Integer kategoryDiagnosaId;

	@NotNull(message="QDiagnosa Tindakan tidak boleh kosong")
	@Column(name = "QDiagnosaTindakan", nullable = false )
	@Caption(value="QDiagnosa Tindakan")
	private Integer qDiagnosaTindakan;

	public void setqDiagnosaTindakan(Integer qDiagnosaTindakan) {
		this.qDiagnosaTindakan = qDiagnosaTindakan;
	}


	public Integer getqDiagnosaTindakan(){
		return this.qDiagnosaTindakan;
	}


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

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