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 KeadaanLahirBayi
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KeadaanLahirBayi_M")
public class KeadaanLahirBayi extends BaseMaster {
	@NotNull(message = "Kd Keadaan Lahir Bayi tidak boleh kosong")
	@Column(name = "KdKeadaanLahirBayi", nullable = false, length = 2)
	@Caption(value = "Kode Keadaan Lahir Bayi")
	private String kdKeadaanLahirBayi;

	public void setKdKeadaanLahirBayi(String kdKeadaanLahirBayi) {
		this.kdKeadaanLahirBayi = kdKeadaanLahirBayi;
	}

	public String getKdKeadaanLahirBayi() {
		return this.kdKeadaanLahirBayi;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectKuantitasLahirBayiFk")
	@NotNull(message = "Kd Kuantitas Lahir Bayi tidak boleh kosong")

	@Caption(value = "Object Kuantitas Lahir Bayi")
	private KuantitasLahirBayi kuantitasLahirBayi;

	public void setKuantitasLahirBayi(KuantitasLahirBayi kuantitasLahirBayi) {
		this.kuantitasLahirBayi = kuantitasLahirBayi;
	}

	public KuantitasLahirBayi getKuantitasLahirBayi() {
		return this.kuantitasLahirBayi;
	}

	@Column(name = "ObjectKuantitasLahirBayiFk", insertable = false, updatable = false)
	private Integer kuantitasLahirBayiId;

	@NotNull(message = "Keadaan Lahir Bayi tidak boleh kosong")
	@Column(name = "KeadaanLahirBayi", nullable = false, length = 30)
	@Caption(value = "Keadaan Lahir Bayi")
	private String keadaanLahirBayi;

	public void setKeadaanLahirBayi(String keadaanLahirBayi) {
		this.keadaanLahirBayi = keadaanLahirBayi;
	}

	public String getKeadaanLahirBayi() {
		return this.keadaanLahirBayi;
	}

	@NotNull(message = "QKeadaan Lahir Bayi tidak boleh kosong")
	@Column(name = "QKeadaanLahirBayi", nullable = false)
	@Caption(value = "QKeadaan Lahir Bayi")
	private Byte qKeadaanLahirBayi;

	public void setqKeadaanLahirBayi(Byte qKeadaanLahirBayi) {
		this.qKeadaanLahirBayi = qKeadaanLahirBayi;
	}

	public Byte getqKeadaanLahirBayi() {
		return this.qKeadaanLahirBayi;
	}

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

	public Integer getId() {

		return id;
	}

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