package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "ItStatusPerbaikan_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class ItStatusPerbaikan extends BaseTransaction {

	@OneToOne(fetch = LAZY)
	@Caption(value = "It Perbaikan")
	@JoinColumn(name = "ObjectItPerbaikanFk")
	private ItPerbaikan itPerbaikan;

	@Column(name = "ObjectItPerbaikanFk", columnDefinition = "CHAR(32)", nullable = false, insertable = false, updatable = false)
	private String itPerbaikanId;

	/**
	 * 0 - belum ada yang dikerjakan 1 - pemeliharaan sudah dikerjakan 2 -
	 * service sudah dikerjakan 3 - kalibrasi sudah dikerjakan
	 */
	@Caption(value = "Status Pengerjaan")
	@Column(name = "StatusPengerjaan")
	private Integer statusPengerjaan;

	/**
	 * 0 - jadwal belum keluar 1 - respon hijau 0-15 menit 2 - respon kuning
	 * 15-30 menit 3 - respon merah >30 menit
	 */
	@Caption(value = "Status Respon")
	@Column(name = "StatusRespon")
	private Integer statusRespon;

	@Caption(value = "WaktuRespon")
	@Column(name = "WaktuRespon")
	private Long waktuRespon;

	@Caption(value = "Ket Status Respon")
	@Column(name = "KetStatusRespon")
	private String ketStatusRespon;

}
