package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseActive;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "produkfarmakologi_m")
public class ProdukFarmakologi extends BaseActive {

	private static final long serialVersionUID = -4184210423898563156L;

	@NotNull(message = "Nama Produk tidak boleh kosong")
	@Column(name = "namaproduk", nullable = false)
	@Caption(value = "Nama Produk")
	private String namaProduk;

	/*
	 * 1-Pelayanan Pasien (Tarif), 2-Pelayanan Pasien (Nontarif), 3-Pelayanan
	 * Nonpasien
	 */
	@NotNull(message = "Kode Produk tidak boleh kosong")
	@Column(name = "kdproduk", nullable = false)
	@Caption(value = "Kode Produk")
	private Short kdProduk;

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

	public String getNamaProduk() {
		return namaProduk;
	}

	public void setNamaProduk(String namaProduk) {
		this.namaProduk = namaProduk;
	}

	public Short getKdProduk() {
		return kdProduk;
	}

	public void setKdProduk(Short kdProduk) {
		this.kdProduk = kdProduk;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

}
