package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class MapKalenderToHariLibur
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MapKalenderToHariLibur_M")
public class MapKalenderToHariLibur extends BaseMaster {

	private static final long serialVersionUID = -1571116407894714011L;

	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "public.mapkalendertoharilibur_m_id_seq")
	@SequenceGenerator(name = "public.mapkalendertoharilibur_m_id_seq", sequenceName = "public.mapkalendertoharilibur_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	@ManyToOne
	@JoinColumn(name = "ObjectHariLiburFk")
	@NotNull(message = "Kd Hari Libur tidak boleh kosong")
	@Caption(value = "Object Hari Libur")
	private HariLibur hariLibur;

	@Column(name = "ObjectHariLiburFk", insertable = false, updatable = false)
	private Integer hariLiburId;

	@ManyToOne
	@JoinColumn(name = "ObjectTanggalFk")
	@Caption(value = "Object Tanggal")
	private Kalender tanggal;

	@Column(name = "ObjectTanggalFk", insertable = false, updatable = false, nullable = false)
	private Integer tanggalId;

	@Column(name = "is_cuti_bersama_ditangguhkan")
	private Boolean isCutiBersamaDitangguhkan;

}