package com.jasamedika.medifirst2000.entities;

import java.util.Date;

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

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

@Entity
@Table(name = "userloggingactivity_t")
public class LoggingUser extends BaseTransaction {

	@Caption(value = "Tanggal")
	@Column(name = "tanggal", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date tanggal;

	@ManyToOne
	@NotNull(message = "User tidak boleh kosong")
	@JoinColumn(name = "objectloginuserfk")
	@Caption(value = "User")
	private LoginUser loginUser;

	@Column(name = "objectloginuserfk", insertable = false, updatable = false, nullable = true)
	private Integer loginUserId;

	@Column(name = "jenislog", nullable = false)
	@Caption(value = "Jenis Log")
	private String jenisLog;

	@Column(name = "objectreferensifk", nullable = false)
	@Caption(value = "Id Referensi")
	private String referensiId;

	@Column(name = "referensi", nullable = false)
	@Caption(value = "Referensi")
	private String referensi;

	@Column(name = "keterangan", nullable = true)
	@Caption(value = "Keterangan")
	private String keterangan;

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

	public LoginUser getLoginUser() {
		return loginUser;
	}

	public void setLoginUser(LoginUser loginUser) {
		this.loginUser = loginUser;
	}

	public Integer getLoginUserId() {
		return loginUserId;
	}

	public void setLoginUserId(Integer loginUserId) {
		this.loginUserId = loginUserId;
	}

	public String getJenisLog() {
		return jenisLog;
	}

	public void setJenisLog(String jenisLog) {
		this.jenisLog = jenisLog;
	}

	public String getReferensiId() {
		return referensiId;
	}

	public void setReferensiId(String referensiId) {
		this.referensiId = referensiId;
	}

	public String getReferensi() {
		return referensi;
	}

	public void setReferensi(String referensi) {
		this.referensi = referensi;
	}

	public String getKeterangan() {
		return keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}

}
