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 HargaNettoProdukByTerima
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "HargaNettoProdukByTerima_T")
public class HargaNettoProdukByTerima extends BaseTransaction {

	@Caption(value = "Factor Rate")
	@NotNull(message = "Factor Rate tidak boleh kosong")
	@Column(name = "FactorRate", nullable = false)
	private Double factorRate;

	@Caption(value = "Harga Discount")
	@NotNull(message = "hargaDiscount tidak boleh kosong")
	@Column(name = "HargaDiscount", nullable = false)
	private Double hargaDiscount;

	@Caption(value = "Harga Netto1")
	@NotNull(message = "hargaDiscount tidak boleh kosong")
	@Column(name = "HargaNetto1", nullable = false)
	private Double hargaNetto1;

	@Caption(value = "Harga Netto2")
	@NotNull(message = "hargaDiscount tidak boleh kosong")
	@Column(name = "HargaNetto2", nullable = false)
	private Double hargaNetto2;

	@Caption(value = "Harga Satuan")
	@NotNull(message = "hargaDiscount tidak boleh kosong")
	@Column(name = "HargaSatuan", nullable = false)
	private Double hargaSatuan;

	@ManyToOne
	@JoinColumn(name = "ObjectAsalProdukFk")
	@NotNull(message = "hargaDiscount tidak boleh kosong")
	@Caption(value = "Object Asal Produk")
	private AsalProduk asalProduk;

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

	@ManyToOne
	@JoinColumn(name = "ObjectMataUangFk")
	@Caption(value = "Object Mata Uang")
	private MataUang mataUang;

	@Column(name = "ObjectMataUangFk", insertable = false, updatable = false)
	private Integer mataUangId;

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

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

	@ManyToOne
	@JoinColumn(name = "NoStrukTerimaFk")
	@Caption(value = "No Struk Terima")
	private StrukPelayanan noStrukTerima;

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

	@Caption(value = "Persen Discount")
	@Column(name = "PersenDiscount")
	private Double persenDiscount;

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

	@Caption(value = "Qty Produk Out Ext")
	@Column(name = "QtyProdukOutExt")
	private Double qtyProdukOutExt;

	@Caption(value = "Qty Produk Out Int")
	@Column(name = "QtyProdukOutInt")
	private Double qtyProdukOutInt;

	@Caption(value = "Tanggal Kadaluarsa Last")
	@Column(name = "TglKadaluarsaLast")
	private Date tglKadaluarsaLast;

}
