package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;

import static javax.persistence.FetchType.LAZY;

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectStrukOrderFk")
	private StrukOrder strukOrder;

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectPetugasFk")
	private Pegawai petugas;

	@Column(name = "ObjectPetugasFk", insertable = false, updatable = false, nullable = false)
	private Integer petugasId;

}
