package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

@Getter
@Setter
@Entity
@Table(name = "DetailJenisLimbah_T")
public class DetailJenisLimbah extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectjenisLimbahB3MasukFk", nullable = false)
	@NotNull(message = "Jenis Limbah tidak boleh kosong")
	private JenisLimbahB3Masuk jenisLimbahB3Masuk;

	@Column(name = "ObjectjenisLimbahB3MasukFk", insertable = false, updatable = false)
	private Integer jenisLimbahB3MasukId;

	@ManyToOne
	@JsonBackReference
	@JoinColumn(name = "objectNeracaLimbahFk")
	@NotNull(message = "Neraca Limbah Tidak Boleh Kosong")
	private NeracaLimbah neracaLimbah;

	@Column(name = "objectNeracaLimbahFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String neracaLimbahId;

	@Column(name = "jenisLimbahYangDikelola")
	private Double jumlah;

}
