package com.jasamedika.medifirst2000.vo;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.helper.Caption;

public class PermintaanBarangDariRuanganVO extends BaseTransactionVO {

	@Caption(value = "No Order")
	private String noOrder;

	@Caption(value = "Tgl Order")
	private Date tglOrder;

	@ManyToOne
	@JoinColumn(name = "ObjectStatusBarangFk")
	@Caption(value = "Object Status Barang")
	private StatusBarangVO statusBarang;

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private RuanganVO ruangan;

	@OneToMany(cascade = CascadeType.ALL, mappedBy = "permintaanBarangDariRuangan")
	@Caption(value = "permintaanBarangDariRuanganSet")
	private Set<PermintaanBarangDariRuanganSetVO> permintaanBarangDariRuanganSet = new HashSet<PermintaanBarangDariRuanganSetVO>();

	@Column(name = "NoOrder", nullable = false)
	public String getNoOrder() {
		return noOrder;
	}

	public void setNoOrder(String noOrder) {
		this.noOrder = noOrder;
	}

	@Column(name = "TglOrder", nullable = false)
	public Date getTglOrder() {
		return tglOrder;
	}

	public void setTglOrder(Date tglOrder) {
		this.tglOrder = tglOrder;
	}

	public StatusBarangVO getStatusBarang() {
		return statusBarang;
	}

	public void setStatusBarang(StatusBarangVO statusBarang) {
		this.statusBarang = statusBarang;
	}

	public RuanganVO getRuangan() {
		return ruangan;
	}

	public void setRuangan(RuanganVO ruangan) {
		this.ruangan = ruangan;
	}

	public Set<PermintaanBarangDariRuanganSetVO> getPermintaanBarangDariRuanganSet() {
		return permintaanBarangDariRuanganSet;
	}

	public void setPermintaanBarangDariRuanganSet(
			Set<PermintaanBarangDariRuanganSetVO> permintaanBarangDariRuanganSet) {
		this.permintaanBarangDariRuanganSet = permintaanBarangDariRuanganSet;
	}

}
