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

	@NotNull(message = "Kd Hari tidak boleh kosong")
	@Column(name = "KdHari", nullable = false)
	@Caption(value = "Kode Hari")
	private Byte kdHari;

	@NotNull(message = "Nama Hari tidak boleh kosong")
	@Column(name = "NamaHari", nullable = false, length = 10)
	@Caption(value = "Nama Hari")
	private String namaHari;

	@NotNull(message = "No Urut Hari Ke tidak boleh kosong")
	@Column(name = "NoUrutHariKe", nullable = false)
	@Caption(value = "No Urut Hari Ke")
	private Byte noUrutHariKe;

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

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

}