package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * @author salmanoe
 * @since Dec 23, 2021
 */
@Entity
@Table(name = "sdm_targetskordokterdetail_t")
public class TargetSkorDokterDetail extends BaseTransaction {

	private static final long serialVersionUID = -6511663625942070891L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "targetskorfk")
	@NotNull(message = "Target skor dasar harus diisi")
	@Caption(value = "Target Skor")
	private TargetSkorDokter targetSkor;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "objectpegawaifk")
	@NotNull(message = "Pegawai harus diisi")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "objectpegawaifk", insertable = false, updatable = false, nullable = false)
	private Integer pegawaiId;

	@Column(name = "skor", nullable = false)
	@NotNull(message = "Skor harus diisi")
	@Caption(value = "Skor")
	private Double skor;

	public TargetSkorDokter getTargetSkor() {
		return targetSkor;
	}

	public void setTargetSkor(TargetSkorDokter targetSkor) {
		this.targetSkor = targetSkor;
	}

	public String getTargetSkorId() {
		return targetSkorId;
	}

	public void setTargetSkorId(String targetSkorId) {
		this.targetSkorId = targetSkorId;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

	public void setPegawai(Pegawai pegawai) {
		this.pegawai = pegawai;
	}

	public Integer getPegawaiId() {
		return pegawaiId;
	}

	public void setPegawaiId(Integer pegawaiId) {
		this.pegawaiId = pegawaiId;
	}

	public Double getSkor() {
		return skor;
	}

	public void setSkor(Double skor) {
		this.skor = skor;
	}

}
