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

	@NotNull(message = "Akun tidak boleh kosong")
	@Caption(value = "Akun")
	@Column(name = "Akun", nullable = false, length = 200)
	private String namaAkun;

	@NotNull(message = "Kode Akun tidak boleh kosong")
	@Caption(value = "Kode Akun")
	@Column(name = "KodeAkun", nullable = true, length = 50)
	private String kodeAkun;

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

	public String getNamaAkun() {
		return namaAkun;
	}

	public void setNamaAkun(String namaAkun) {
		this.namaAkun = namaAkun;
	}

	public String getKodeAkun() {
		return kodeAkun;
	}

	public void setKodeAkun(String kodeAkun) {
		this.kodeAkun = kodeAkun;
	}

	public String getKetAkun() {
		return ketAkun;
	}

	public void setKetAkun(String ketAkun) {
		this.ketAkun = ketAkun;
	}

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

	public Integer getId() {

		return id;
	}

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