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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectOrderPelayananFk")
	private OrderPelayanan orderPelayanan;

	@Column(name = "ObjectOrderPelayananFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String orderPelayananId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectProdukFk")
	@Caption(value = "Object Produk")
	private Produk produk;

	@Column(name = "ObjectProdukFk", insertable = false, updatable = false)
	private Integer produkId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectHargaFk")
	@Caption(value = "Object Harga")
	private HargaNettoProdukByKelas harga;

	@Column(name = "ObjectHargaFk", insertable = false, updatable = false)
	private Integer hargaId;

}
