package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

/**
 * @author Teguh
 */
@Getter
@Setter
@Entity
@Table(name = "Kelahiran_T")
public class Kelahiran extends MedicalRecordTransaction {

	@Column(name = "umurKehamilan")
	@Caption(value = "Umur Kehamilan")
	private Integer umurKehamilan;

	@ManyToOne
	@JoinColumn(name = "ObjectBantuanPernapasanFk")
	@NotNull(message = "Bantuan Pernapasan tidak boleh kosong")
	private StatusYaTidak bantuanPernapasan;

	@Column(name = "ObjectBantuanPernapasanFk", insertable = false, updatable = false)
	private Integer bantuanPernapasanId;

	@ManyToOne
	@JoinColumn(name = "ObjectProsesKelahiranFk")
	@NotNull(message = "Proses Kelahiran tidak boleh kosong")
	private ProsesKelahiran prosesKelahiran;

	@Column(name = "ObjectProsesKelahiranFk", insertable = false, updatable = false)
	private Integer prosesKelahiranID;

	@Column(name = "indikasi")
	@Caption(value = "Umur Kehamilan")
	private String indikasi;

	@Column(name = "dibantuOleh")
	@Caption(value = "Dibantu Oleh")
	private String dibantuOleh;

	@Column(name = "tempat")
	@Caption(value = "Tempat")
	private String tempat;

	@Column(name = "anakMenangis")
	@Caption(value = "Anak Menangis")
	private String anakMenangis;

	@Column(name = "beratLahir")
	@Caption(value = "Berat Lahir")
	private Integer beratLahir;

	@Column(name = "lingkarKepala")
	@Caption(value = "Lingkar Kepala")
	private Integer lingkarKepala;

	@Column(name = "panjang")
	@Caption(value = "panjang")
	private Integer panjang;

	@Column(name = "nilaiApgar")
	@Caption(value = "Nilai Apgar")
	private Integer nilaiApgar;

}
