package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity // @Audited
@Table(name = "PemakaianKendaraanDinas_T")
public class PemakaianKendaraanDinas extends BaseTransaction {

	private static final long serialVersionUID = 2550059845860386007L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectAssetFk")
	@Caption(value = "Asset")
	private RegistrasiAset asset;

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

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

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectSupirFk")
	private Pegawai supir;

	@Column(name = "ObjectSupirFk", insertable = false, updatable = false)
	private Integer supirId;

	public OrderPelayanan getOrderPelayanan() {
		return orderPelayanan;
	}

	public void setOrderPelayanan(OrderPelayanan orderPelayanan) {
		this.orderPelayanan = orderPelayanan;
	}

	public Pegawai getSupir() {
		return supir;
	}

	public void setSupir(Pegawai supir) {
		this.supir = supir;
	}

	public RegistrasiAset getAsset() {
		return asset;
	}

	public void setAsset(RegistrasiAset asset) {
		this.asset = asset;
	}

}
