package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * class DestroyProdukDetail
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "DestroyProdukDetail_T")
public class DestroyProdukDetail extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectAsalProdukFk")
	@NotNull(message = "Object Asal Produk Harus Diisi")
	@Caption(value = "Object Asal Produk")
	private AsalProduk asalProduk;

	@Column(name = "ObjectAsalProdukFk", insertable = false, updatable = false)
	private Integer asalProdukId;

	@ManyToOne
	@JoinColumn(name = "ObjectProdukFk")
	@NotNull(message = "Object Produk Harus Diisi")
	@Caption(value = "Object Produk")
	private Produk produk;

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

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@NotNull(message = "Object Ruangan Harus Diisi")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

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

	@Caption(value = "No Batch")
	@Column(name = "NoBatch", length = 250)
	private String nobatch;

	@ManyToOne
	@JoinColumn(name = "NoHistoriFk")
	@NotNull(message = "No Histori Harus Diisi")
	@Caption(value = "No Histori")
	private StrukHistori strukHistory;

	@Column(name = "NoHistoriFk", insertable = false, updatable = false)
	private String strukHistoryId;

	@Column(name = "tglKadaluarsa")
	private Date tglKadaluarsa;

	@ManyToOne
	@JoinColumn(name = "NoRegisterAsetFk")
	@Caption(value = "No Register Aset")
	private RegistrasiAset registerAset;

	@Column(name = "NoRegisterAsetFk", insertable = false, updatable = false)
	private String NoRegisterAsetId;

	@ManyToOne
	@JoinColumn(name = "NoStrukTerimaFk")
	@NotNull(message = "No Struk Terima Harus Diisi")
	@Caption(value = "No Struk Terima")
	private StrukPelayanan strukPelayanan;

	@Column(name = "NoStrukTerimaFk", insertable = false, updatable = false)
	private String strukPelayananId;

	@Caption(value = "No Urut")
	@Column(name = "NoUrut", nullable = false)
	private short noUrut;

	@ManyToOne
	@JoinColumn(name = "NoVerifikasiFk")
	@Caption(value = "No Verifikasi")
	private StrukVerifikasi strukVerifikasi;

	@Column(name = "NoVerifikasiFk", insertable = false, updatable = false)
	private String strukVerifikasiId;

	@ManyToOne
	@JoinColumn(name = "DestroyProdukFk")
	@Caption(value = "Destry Produk")
	private DestroyProduk destroyProduk;

	@Column(name = "DestroyProdukFk", insertable = false, updatable = false)
	private String destroyProdukId;

	@Caption(value = "Qty Produk")
	@Column(name = "QtyProduk")
	private Double qtyProduk;

}
