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 = "Koping_T")
public class Koping extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectPasienDaftarFk")
	@NotNull(message = "PasienDaftar Harus Diisi")
	@Caption(value = "PasienDaftar")
	private AntrianPasienDiPeriksa pasienDaftar;

	@Column(name = "ObjectPasienDaftarFk", insertable = false, updatable = false, nullable = false)
	private String pasienDaftarId;

	@NotNull(message = "Tgl Input tidak boleh kosong")
	@Column(name = "tglInput", nullable = false)
	@Caption(value = "Tgl Input")
	private Date tglInput;

	@ManyToOne
	@JoinColumn(name = "ObjectPenangananStressFk")
	@NotNull(message = "Object PenangananStress Harus Diisi")
	@Caption(value = "Object PenangananStress")
	private StatusPenangananStress penangananStress;

	@Column(name = "ObjectPenangananStressFk", insertable = false, updatable = false, nullable = false)
	private Integer penangananStressId;

}
