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 StrukturNoCM
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "StrukturNoCM_M")
public class StrukturNoCM extends BaseMaster {
	@NotNull(message = "Automatic No C M Member tidak boleh kosong")
	@Column(name = "AutomaticNoCMMember", nullable = false)
	@Caption(value = "Automatic No C M Member")
	private Byte automaticNoCMMember;

	public void setAutomaticNoCMMember(Byte automaticNoCMMember) {
		this.automaticNoCMMember = automaticNoCMMember;
	}

	public Byte getAutomaticNoCMMember() {
		return this.automaticNoCMMember;
	}

	@NotNull(message = "Automatic No C M Non Member tidak boleh kosong")
	@Column(name = "AutomaticNoCMNonMember", nullable = false)
	@Caption(value = "Automatic No C M Non Member")
	private Byte automaticNoCMNonMember;

	public void setAutomaticNoCMNonMember(Byte automaticNoCMNonMember) {
		this.automaticNoCMNonMember = automaticNoCMNonMember;
	}

	public Byte getAutomaticNoCMNonMember() {
		return this.automaticNoCMNonMember;
	}

	@NotNull(message = "Format No C M Member tidak boleh kosong")
	@Column(name = "FormatNoCMMember", nullable = false, length = 15)
	@Caption(value = "Format No C M Member")
	private String formatNoCMMember;

	public void setFormatNoCMMember(String formatNoCMMember) {
		this.formatNoCMMember = formatNoCMMember;
	}

	public String getFormatNoCMMember() {
		return this.formatNoCMMember;
	}

	@NotNull(message = "Format No C M Non Member tidak boleh kosong")
	@Column(name = "FormatNoCMNonMember", nullable = false, length = 15)
	@Caption(value = "Format No C M Non Member")
	private String formatNoCMNonMember;

	public void setFormatNoCMNonMember(String formatNoCMNonMember) {
		this.formatNoCMNonMember = formatNoCMNonMember;
	}

	public String getFormatNoCMNonMember() {
		return this.formatNoCMNonMember;
	}

	@Column(name = "isDefault", nullable = true)
	@Caption(value = "Is Default")
	private Byte isDefault;

	public void setIsDefault(Byte isDefault) {
		this.isDefault = isDefault;
	}

	public Byte getIsDefault() {
		return this.isDefault;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")

	@Caption(value = "Object Departemen")
	private Departemen departemen;

	public void setDepartemen(Departemen departemen) {
		this.departemen = departemen;
	}

	public Departemen getDepartemen() {
		return this.departemen;
	}

	@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
	private Integer departemenId;

	@NotNull(message = "Kd Struktur No C M tidak boleh kosong")
	@Column(name = "KdStrukturNoCM", nullable = false)
	@Caption(value = "Kode Struktur No C M")
	private Byte kdStrukturNoCM;

	public void setKdStrukturNoCM(Byte kdStrukturNoCM) {
		this.kdStrukturNoCM = kdStrukturNoCM;
	}

	public Byte getKdStrukturNoCM() {
		return this.kdStrukturNoCM;
	}

	@NotNull(message = "No Urut Akhir Member tidak boleh kosong")
	@Column(name = "NoUrutAkhirMember", nullable = false, length = 15)
	@Caption(value = "No Urut Akhir Member")
	private String noUrutAkhirMember;

	public void setNoUrutAkhirMember(String noUrutAkhirMember) {
		this.noUrutAkhirMember = noUrutAkhirMember;
	}

	public String getNoUrutAkhirMember() {
		return this.noUrutAkhirMember;
	}

	@NotNull(message = "No Urut Akhir Non Member tidak boleh kosong")
	@Column(name = "NoUrutAkhirNonMember", nullable = false, length = 15)
	@Caption(value = "No Urut Akhir Non Member")
	private String noUrutAkhirNonMember;

	public void setNoUrutAkhirNonMember(String noUrutAkhirNonMember) {
		this.noUrutAkhirNonMember = noUrutAkhirNonMember;
	}

	public String getNoUrutAkhirNonMember() {
		return this.noUrutAkhirNonMember;
	}

	@NotNull(message = "No Urut Awal Member tidak boleh kosong")
	@Column(name = "NoUrutAwalMember", nullable = false, length = 15)
	@Caption(value = "No Urut Awal Member")
	private String noUrutAwalMember;

	public void setNoUrutAwalMember(String noUrutAwalMember) {
		this.noUrutAwalMember = noUrutAwalMember;
	}

	public String getNoUrutAwalMember() {
		return this.noUrutAwalMember;
	}

	@NotNull(message = "No Urut Awal Non Member tidak boleh kosong")
	@Column(name = "NoUrutAwalNonMember", nullable = false, length = 15)
	@Caption(value = "No Urut Awal Non Member")
	private String noUrutAwalNonMember;

	public void setNoUrutAwalNonMember(String noUrutAwalNonMember) {
		this.noUrutAwalNonMember = noUrutAwalNonMember;
	}

	public String getNoUrutAwalNonMember() {
		return this.noUrutAwalNonMember;
	}

	@NotNull(message = "Struktur No C M tidak boleh kosong")
	@Column(name = "StrukturNoCM", nullable = false, length = 50)
	@Caption(value = "Struktur No C M")
	private String strukturNoCM;

	public void setStrukturNoCM(String strukturNoCM) {
		this.strukturNoCM = strukturNoCM;
	}

	public String getStrukturNoCM() {
		return this.strukturNoCM;
	}

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

	public Integer getId() {

		return id;
	}

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