package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "Komponen_M")
public class Komponen extends BaseMaster {

	@NotNull(message = "Komponen tidak boleh kosong")
	@Caption(value = "Komponen")
	@Column(name = "Komponen", nullable = true, length = 200)
	private String namaKomponen;

	@NotNull(message = "Kode Komponen tidak boleh kosong")
	@Caption(value = "Kode Komponen")
	@Column(name = "KodeKomponen", nullable = true, length = 50)
	private String kodeKomponen;

	@NotNull(message = "Keterangan tidak boleh kosong")
	@Caption(value = "Keterangan")
	@Column(name = "Keterangan", nullable = true, length = 200)
	private String ketKomponen;

	public String getNamaKomponen() {
		return namaKomponen;
	}

	public void setNamaKomponen(String namaKomponen) {
		this.namaKomponen = namaKomponen;
	}

	public String getKodeKomponen() {
		return kodeKomponen;
	}

	public void setKodeKomponen(String kodeKomponen) {
		this.kodeKomponen = kodeKomponen;
	}

	public String getKetKomponen() {
		return ketKomponen;
	}

	public void setKetKomponen(String ketKomponen) {
		this.ketKomponen = ketKomponen;
	}

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

	public Integer getId() {

		return id;
	}

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