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.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

/**
 *  class KesadaranCheckOutDetail
 * 
 * @author shakato
 */
@Entity //@Audited
@Table(name = "KesadaranCheckOutDetail_T")
public class KesadaranCheckOutDetail extends BaseTransaction {
	
	@ManyToOne
	@JoinColumn(name = "ObjectCheckOutOperationFk")
	@Caption(value = "ID checkOutOperation")
	@NotNull(message = "ID checkOutOperation tidak boleh kosong")
	private CheckOutOperation checkOutOperation;
	
	@Column(name = "ObjectCheckOutOperationFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String checkOutOperationId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectKesadaranCheckOutFk")
	@Caption(value = "ID KesadaranCheckOut")
	@NotNull(message = "ID KesadaranCheckOut tidak boleh kosong")
	private KesadaranCheckOut kesadaranCheckOut;
	
	@Column(name = "ObjectKesadaranCheckOutFk", insertable = false, updatable = false, nullable = false)
	private Integer kesadaranCheckOutId;
	
	@Column(name = "status", nullable = true)
	@Caption(value = "status")
	private Boolean status;

	public CheckOutOperation getCheckOutOperation() {
		return checkOutOperation;
	}

	public void setCheckOutOperation(CheckOutOperation checkOutOperation) {
		this.checkOutOperation = checkOutOperation;
	}

	public String getCheckOutOperationId() {
		return checkOutOperationId;
	}

	public void setCheckOutOperationId(String checkOutOperationId) {
		this.checkOutOperationId = checkOutOperationId;
	}

	public KesadaranCheckOut getKesadaranCheckOut() {
		return kesadaranCheckOut;
	}

	public void setKesadaranCheckOut(KesadaranCheckOut kesadaranCheckOut) {
		this.kesadaranCheckOut = kesadaranCheckOut;
	}

	public Integer getKesadaranCheckOutId() {
		return kesadaranCheckOutId;
	}

	public void setKesadaranCheckOutId(Integer kesadaranCheckOutId) {
		this.kesadaranCheckOutId = kesadaranCheckOutId;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}
	
}