package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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 KondisiProduk
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "KondisiProduk_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class KondisiProduk extends BaseMaster {

	@NotNull(message = "Kd Kondisi Produk tidak boleh kosong")
	@Column(name = "KdKondisiProduk", nullable = false)
	@Caption(value = "Kode Kondisi Produk")
	private Byte kdKondisiProduk;

	@NotNull(message = "Kondisi Produk tidak boleh kosong")
	@Column(name = "KondisiProduk", nullable = false, length = 30)
	@Caption(value = "Kondisi Produk")
	private String kondisiProduk;

	@NotNull(message = "QKondisi Produk tidak boleh kosong")
	@Column(name = "QKondisiProduk", nullable = false)
	@Caption(value = "QKondisi Produk")
	private Byte qKondisiProduk;

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

}