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 = "ItPelaksanaanPerbaikanListTeknisi_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class ItPelaksanaanPerbaikanListTeknisi extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@Caption(value = "It Pelaksanaan Perbaikan")
	@JoinColumn(name = "ObjectItPelaksanaanPerbaikanFk")
	private ItPelaksanaanPerbaikan itPelaksanaanPerbaikan;

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectTeknisiFk")
	@Caption(value = "Teknisi")
	private Pegawai teknisi;

	@Column(name = "ObjectTeknisiFk", nullable = false, insertable = false, updatable = false)
	private Integer teknisiId;

}
