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;

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

	private static final long serialVersionUID = 74425949225244932L;

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

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

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

	@Column(name = "ObjectNamaBahanFk", 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;

}
