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;

@Getter
@Setter
@Entity
@Table(name = "DetailHVA_T")
public class DetailHVA extends BaseTransaction {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectHVAFk")
	@Caption(value = "Object HVA")
	private HVA hva;

	@Column(name = "ObjectHVAFk", insertable = false, updatable = false, nullable = false)
	private String hvafk;

	@Column(name = "event", nullable = false)
	@NotNull(message = "Event tidak boleh kosong")
	@Caption(value = "Event")
	private String event;

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

	@Column(name = "humanImpact")
	@Caption(value = "Human Impact")
	private Integer humanImpact;

	@Column(name = "propertyImpact")
	@Caption(value = "Property Impact")
	private Integer propertyImpact;

	@Column(name = "businessImpact")
	@Caption(value = "Business Impact")
	private Integer businessImpact;

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

	@Column(name = "internalResponse")
	@Caption(value = "Internal Response")
	private Integer internalResponse;

	@Column(name = "externalResponse")
	@Caption(value = "External Response")
	private Integer externalResponse;

}
