package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseModel;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "Habsen")
public class Habsen extends BaseModel {

	private static final long serialVersionUID = 6197131414965211726L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "native")
	@GenericGenerator(name = "native", strategy = "native")
	@Column(name = "tr_no", nullable = false)
	@Caption(value = "tr_no")
	private Integer tr_no;

	@Column(name = "loc_code", nullable = false, length = 5)
	@Caption(value = "loc_code")
	private String loc_code;

	@Column(name = "remoteno", nullable = false)
	@Caption(value = "remoteno")
	private Integer remoteno;

	@Column(name = "tr_date", nullable = false)
	@Caption(value = "tr_date")
	private Date tr_date;

	@Column(name = "tr_time", nullable = false)
	@Caption(value = "tr_time")
	private Date tr_time;

	@Column(name = "empl_code", nullable = false, length = 22)
	@Caption(value = "empl_code")
	private String empl_code;

	@Column(name = "acc_code", length = 10)
	@Caption(value = "acc_code")
	private String acc_code;

	@Column(name = "processtatus")
	@Caption(value = "processtatus")
	private Integer processtatus;

	@Column(name = "ip_addr", length = 100)
	@Caption(value = "ip_addr")
	private String ip_addr;

	@Column(name = "client_ip_addr", length = 100)
	@Caption(value = "client_ip_addr")
	private String clientIPAddress;

	@Column(name = "latitude")
	@Caption(value = "latitude")
	private Double latitude;

	@Column(name = "longitude")
	@Caption(value = "longitude")
	private Double longitude;

	@Column(name = "akurasi")
	@Caption(value = "akurasi")
	private Integer akurasi;

	@Column(name = "lokasi", length = 1000)
	@Caption(value = "lokasi")
	private String lokasi;

	@Column(name = "jenispresensi")
	@Caption(value = "Jenis Presensi")
	private Integer jenisPresensi;

	/**
	 * 0. Presensi keluar/pulang<br/>
	 * 1. Presensi masuk
	 */
	@Column(name = "tag")
	@Caption(value = "Tag")
	private Short tag;

}
