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 MapAngkaToBulan
 * 
 * @author Generator
 */
@Entity //@Audited
@Table(name = "MapAngkaToBulan_M")
public class MapAngkaToBulan extends BaseMaster {
	@NotNull(message="Format Angka tidak boleh kosong")
	@Column(name = "FormatAngka", nullable = false )
	@Caption(value="Format Angka")
	private Byte formatAngka;

	public void setFormatAngka(Byte formatAngka) {
		this.formatAngka = formatAngka;
	}


	public Byte getFormatAngka(){
		return this.formatAngka;
	}

	@NotNull(message="Format Bulan tidak boleh kosong")
	@Column(name = "FormatBulan", nullable = false , length = 10)
	@Caption(value="Format Bulan")
	private String formatBulan;

	public void setFormatBulan(String formatBulan) {
		this.formatBulan = formatBulan;
	}


	public String getFormatBulan(){
		return this.formatBulan;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectMappingFk")
	@NotNull(message="Kd Mapping tidak boleh kosong")

	@Caption(value="Object Mapping")
	private MapAngkaToHari mapping;

	public void setMapping(MapAngkaToHari mapping) {
		this.mapping = mapping;
	}


	public MapAngkaToHari getMapping(){
		return this.mapping;
	}

	@Column(name = "ObjectMappingFk", insertable=false,updatable=false)
	private Integer mappingId;

	@NotNull(message="No Urut tidak boleh kosong")
	@Column(name = "NoUrut", nullable = false )
	@Caption(value="No Urut")
	private Byte noUrut;

	public void setNoUrut(Byte noUrut) {
		this.noUrut = noUrut;
	}


	public Byte getNoUrut(){
		return this.noUrut;
	}

	@NotNull(message="QMapping tidak boleh kosong")
	@Column(name = "QMapping", nullable = false )
	@Caption(value="QMapping")
	private Byte qMapping;

	public void setqMapping(Byte qMapping) {
		this.qMapping = qMapping;
	}


	public Byte getqMapping(){
		return this.qMapping;
	}

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

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