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

	@NotNull(message = "Unit Org tidak boleh kosong")
	@Caption(value = "Unit Org")
	@Column(name = "UnitOrg", nullable = true, length = 200)
	private String namaUnitOrg;

	@NotNull(message = "Kode Unit Org tidak boleh kosong")
	@Caption(value = "Kode Unit Org")
	@Column(name = "KodeUnitOrg", nullable = true, length = 50)
	private String kodeUnitOrg;

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

	public String getNamaUnitOrg() {
		return namaUnitOrg;
	}

	public void setNamaUnitOrg(String namaUnitOrg) {
		this.namaUnitOrg = namaUnitOrg;
	}

	public String getKodeUnitOrg() {
		return kodeUnitOrg;
	}

	public void setKodeUnitOrg(String kodeUnitOrg) {
		this.kodeUnitOrg = kodeUnitOrg;
	}

	public String getKetUnitOrg() {
		return ketUnitOrg;
	}

	public void setKetUnitOrg(String ketUnitOrg) {
		this.ketUnitOrg = ketUnitOrg;
	}

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

	public Integer getId() {

		return id;
	}

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