package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class MerkProduk
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MerkProduk_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class MerkProduk extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message = "Kd Departemen tidak boleh kosong")

	@Caption(value = "Object Departemen")
	private Departemen departemen;

	public void setDepartemen(Departemen departemen) {
		this.departemen = departemen;
	}

	public Departemen getDepartemen() {
		return this.departemen;
	}

	@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
	private Integer departemenId;

	@NotNull(message = "Kd Merk Produk tidak boleh kosong")
	@Column(name = "KdMerkProduk", nullable = false)
	@Caption(value = "Kode Merk Produk")
	private short kdMerkProduk;

	public void setKdMerkProduk(short kdMerkProduk) {
		this.kdMerkProduk = kdMerkProduk;
	}

	public short getKdMerkProduk() {
		return this.kdMerkProduk;
	}

	@NotNull(message = "Merk Produk tidak boleh kosong")
	@Column(name = "MerkProduk", nullable = false, length = 30)
	@Caption(value = "Merk Produk")
	private String merkProduk;

	public void setMerkProduk(String merkProduk) {
		this.merkProduk = merkProduk;
	}

	public String getMerkProduk() {
		return this.merkProduk;
	}

	@NotNull(message = "QMerk Produk tidak boleh kosong")
	@Column(name = "QMerkProduk", nullable = false)
	@Caption(value = "QMerk Produk")
	private short qMerkProduk;

	public void setqMerkProduk(short qMerkProduk) {
		this.qMerkProduk = qMerkProduk;
	}

	public short getqMerkProduk() {
		return this.qMerkProduk;
	}

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

	public Integer getId() {

		return id;
	}

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