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 Jan 11, 2022
 */
@Entity
@Table(name = "sdm_mapfotoprofilpegawai_t")
public class MapFotoProfilPegawai extends BaseTransaction {

	private static final long serialVersionUID = -2307008333710748465L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pegawaifk")
	@NotNull(message = "Pegawai tidak boleh kosong")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

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

	@Column(name = "filepath", nullable = false)
	private String filePath;

	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 String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

}
