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 = "Pengendali_M")
public class Pengendali extends BaseMaster {

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

	@NotNull(message = "Kode Pengendali tidak boleh kosong")
	@Caption(value = "Kode Pengendali")
	@Column(name = "KodePengendali", nullable = true, length = 50)
	private String kodePengendali;

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

	public String getNamaPengendali() {
		return namaPengendali;
	}

	public void setNamaPengendali(String namaPengendali) {
		this.namaPengendali = namaPengendali;
	}

	public String getKodePengendali() {
		return kodePengendali;
	}

	public void setKodePengendali(String kodePengendali) {
		this.kodePengendali = kodePengendali;
	}

	public String getKetPengendali() {
		return ketPengendali;
	}

	public void setKetPengendali(String ketPengendali) {
		this.ketPengendali = ketPengendali;
	}

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

	public Integer getId() {

		return id;
	}

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