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.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;

@Entity //@Audited
@Table(name="PapDataMata_T")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class PapDataMata extends BaseTransaction {
	
	@ManyToOne
	@JoinColumn(name = "DataMataFK")
	@NotNull(message = "DataMata tidak boleh kosong")
	private DataMata dataMata ;
	
	@Column(name = "DataMataFK", insertable = false, updatable = false)
	private Integer dataMataId;
	
	@ManyToOne
	@JoinColumn(name = "PapMataFk", nullable=true)	
	private PapMata papMata;
	
	@Column(name = "PapMataFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String papMataId;
	
	@Column(name = "isNilai",  nullable = true)
	private Boolean isNilai;

	public DataMata getDataMata() {
		return dataMata;
	}

	public void setDataMata(DataMata dataMata) {
		this.dataMata = dataMata;
	}

	public Integer getDataMataId() {
		return dataMataId;
	}

	public void setDataMataId(Integer dataMataId) {
		this.dataMataId = dataMataId;
	}

	public PapMata getPapMata() {
		return papMata;
	}

	public void setPapMata(PapMata papMata) {
		this.papMata = papMata;
	}

	public String getPapMataId() {
		return papMataId;
	}

	public void setPapMataId(String papMataId) {
		this.papMataId = papMataId;
	}

	public Boolean getIsNilai() {
		return isNilai;
	}

	public void setIsNilai(Boolean isNilai) {
		this.isNilai = isNilai;
	}

}
