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.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 StrukturKategoryAccount
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "StrukturKategoryAccount_M")
public class StrukturKategoryAccount extends BaseMaster {
	@NotNull(message = "Format Account tidak boleh kosong")
	@Column(name = "FormatAccount", nullable = false, length = 50)
	@Caption(value = "Format Account")
	private String formatAccount;

	public void setFormatAccount(String formatAccount) {
		this.formatAccount = formatAccount;
	}

	public String getFormatAccount() {
		return this.formatAccount;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectKategoryAccountFk")
	@NotNull(message = "Kd Kategory Account tidak boleh kosong")

	@Caption(value = "Object Kategory Account")
	private KategoryAccount kategoryAccount;

	public void setKategoryAccount(KategoryAccount kategoryAccount) {
		this.kategoryAccount = kategoryAccount;
	}

	public KategoryAccount getKategoryAccount() {
		return this.kategoryAccount;
	}

	@Column(name = "ObjectKategoryAccountFk", insertable = false, updatable = false)
	private Integer kategoryAccountId;

	@ManyToOne
	@JoinColumn(name = "ObjectStrukturAccountFk")
	@NotNull(message = "Kd Struktur Account tidak boleh kosong")

	@Caption(value = "Object Struktur Account")
	private StrukturAccount strukturAccount;

	public void setStrukturAccount(StrukturAccount strukturAccount) {
		this.strukturAccount = strukturAccount;
	}

	public StrukturAccount getStrukturAccount() {
		return this.strukturAccount;
	}

	@Column(name = "ObjectStrukturAccountFk", insertable = false, updatable = false, nullable = false)
	private Integer strukturAccountId;

	@NotNull(message = "No Urut Akhir tidak boleh kosong")
	@Column(name = "NoUrutAkhir", nullable = false, length = 3)
	@Caption(value = "No Urut Akhir")
	private String noUrutAkhir;

	public void setNoUrutAkhir(String noUrutAkhir) {
		this.noUrutAkhir = noUrutAkhir;
	}

	public String getNoUrutAkhir() {
		return this.noUrutAkhir;
	}

	@NotNull(message = "No Urut Awal tidak boleh kosong")
	@Column(name = "NoUrutAwal", nullable = false, length = 3)
	@Caption(value = "No Urut Awal")
	private String noUrutAwal;

	public void setNoUrutAwal(String noUrutAwal) {
		this.noUrutAwal = noUrutAwal;
	}

	public String getNoUrutAwal() {
		return this.noUrutAwal;
	}

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

	public Integer getId() {

		return id;
	}

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