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 StrukPelayananDNoBatch
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "StrukPelayananDNoBatch_T")
public class StrukPelayananDNoBatch extends BaseTransaction {
	private static final long serialVersionUID = 5483085214845317721L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectAsalProdukFk")
	@NotNull(message = "Object Asal Produk Harus Diisi")
	@Caption(value = "Object Asal Produk")
	private AsalProduk kdasalproduk;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectProdukFk")
	@NotNull(message = "Object Produk Harus Diisi")
	@Caption(value = "Object Produk")
	private Produk kdproduk;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganFk")
	@NotNull(message = "Object Ruangan Harus Diisi")
	@Caption(value = "Object Ruangan")
	private Ruangan kdruangan;

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

	@Caption(value = "Keterangan Lainnya")
	@Column(name = "KeteranganLainnya", length = 150)
	private String keteranganlainnya;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoClosingFk")
	@Caption(value = "No Closing")
	private StrukClosing noclosing;

	@Column(name = "NoClosingFk", insertable = false, updatable = false)
	private String NoClosingId;

	@Caption(value = "No Kantong Kemasan")
	@Column(name = "NoKantongKemasan", length = 15)
	private String nokantongkemasan;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoStrukFk")
	@NotNull(message = "No Struk Harus Diisi")
	@Caption(value = "No Struk")
	private StrukPelayananDetail nostruk;

	@Column(name = "NoStrukFk", insertable = false, updatable = false)
	private String NoStrukId;

	@Caption(value = "Qty Produk")
	@Column(name = "QtyProduk", nullable = false)
	private Double qtyproduk;

	@Caption(value = "Volumen")
	@Column(name = "Volumen", nullable = false)
	private Double volumen;

	@Caption(value = "Qty Produk Out Ext")
	@Column(name = "QtyProdukOutExt", nullable = false)
	private Double qtyprodukoutext;

	@Caption(value = "Qty Produk Out Int")
	@Column(name = "QtyProdukOutInt", nullable = false)
	private Double qtyprodukoutint;

	@Caption(value = "Tanggal Kadaluarsa")
	@Column(name = "TglKadaluarsa")
	private Date tglkadaluarsa;

	@Caption(value = "Tanggal Pelayanan")
	@Column(name = "TglPelayanan", nullable = false)
	private Date tglpelayanan;

	@Caption(value = "Tanggal Produksi")
	@Column(name = "TglProduksi")
	private Date tglproduksi;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectStatusDarahFk")
	@Caption(value = "Status Darah")
	private StatusDarah statusDarah;

	@Column(name = "ObjectStatusDarahFk", insertable = false, updatable = false)
	private Integer statusDarahId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectSupplierDarahFk")
	@Caption(value = "Supplier Darah")
	private SupplierDarah supplierDarah;

	@Column(name = "ObjectSupplierDarahFk", insertable = false, updatable = false)
	private Integer supplierDarahId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectLokasiDarahFk")
	@Caption(value = "Lokasi Darah")
	private LokasiDarah lokasiDarah;

	@Column(name = "ObjectLokasiDarahFk", insertable = false, updatable = false)
	private Integer lokasiDarahId;
}
