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 = "MappingKamarAsrama_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class MappingKamarAsrama 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 = "ObjectKamarFk")
	@Caption(value = "Object Kamar")
	private Kamar kamar;

	@Column(name = "ObjectKamarFk", insertable = false, updatable = false)
	private Integer kamarId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
	private Integer ruanganId;

	@Caption(value = "Harga Satuan")
	@Column(name = "HargaSatuan")
	private Double hargaSatuan;

}
