package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "MappingCycleLaundry_T")
public class MappingCycleLaundry extends BaseTransaction {

	private static final long serialVersionUID = 74425949225244932L;

	//@JsonBackReference
	@ManyToOne
	@JoinColumn(name = "ObjectMappingCycleFk")
	private MappingCycle mappingCycle;

	@Column(name = "ObjectMappingCycleFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String mappingCycleId;

	@ManyToOne
	@JoinColumn(name = "ObjectNamaBahanFk")
	private Produk namaBahan;

	@Column(name = "ObjectNamaBahanFk", nullable = true, insertable = false, updatable = false)
	private Integer namaBahanId;

	@NotNull(message = "Jumlah tidak boleh kosong")
	@Column(name = "Jumlah", nullable = false)
	@Caption(value = "Jumlah")
	private Integer jumlah;

	@ManyToOne
	@JoinColumn(name = "ObjectSatuanFk")
	private SatuanStandar satuan;

	@Column(name = "ObjectSatuanFk", insertable = false, updatable = false)
	private Integer satuanId;

	public SatuanStandar getSatuan() {
		return satuan;
	}

	public void setSatuan(SatuanStandar satuan) {
		this.satuan = satuan;
	}

	public MappingCycle getMappingCycle() {
		return mappingCycle;
	}

	public void setMappingCycle(MappingCycle mappingCycle) {
		this.mappingCycle = mappingCycle;
	}

	public Produk getNamaBahan() {
		return namaBahan;
	}

	public void setNamaBahan(Produk namaBahan) {
		this.namaBahan = namaBahan;
	}

	public Integer getJumlah() {
		return jumlah;
	}

	public void setJumlah(Integer jumlah) {
		this.jumlah = jumlah;
	}

}
