package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "Korban_T")
public class Korban extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectKecelakaanKerjaFk")
	@NotNull(message = "KecelakaanKerja tidak boleh kosong")
	@Caption(value = "Kecelakaan Kerja")
	private KecelakaanKerja kecelakaanKerja;

	@Column(name = "ObjectKecelakaanKerjaFk", insertable = false, updatable = false, nullable = false)
	private String kecelakaanKerjaId;

	@Column(name = "namaKorban", nullable = false)
	@Caption(value = "Nama Korban")
	private String namaKorban;

	@ManyToOne
	@JoinColumn(name = "ObjectJenisKelaminFk")
	@NotNull(message = "Jenis Kelamin tidak boleh kosong")
	@Caption(value = "Jenis Kelamin")
	private JenisKelamin jenisKelamin;

	@Column(name = "ObjectJenisKelaminFk", insertable = false, updatable = false, nullable = false)
	private Integer jenisKelaminId;

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

	@Column(name = "tglLahir")
	@Caption(value = "Tanggal Lahir")
	private Date tglLahir;

	@Column(name = "statusPekerjaan")
	@Caption(value = "Status Pekerjaan")
	private String statusPekerjaan;

	@Column(name = "statusJabatan")
	@Caption(value = "Status Jabatan")
	private String statusJabatan;

}
