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 HariLibur
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "HariLibur_M")
public class HariLibur extends BaseMaster {

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

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

	@NotNull(message = "Nama Hari Libur tidak boleh kosong")
	@Column(name = "NamaHariLibur", nullable = false, length = 50)
	@Caption(value = "Nama Hari Libur")
	private String namaHariLibur;

	@NotNull(message = "QHari Libur tidak boleh kosong")
	@Column(name = "QHariLibur", nullable = false)
	@Caption(value = "QHari Libur")
	private Byte qHariLibur;

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

}