package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.HashSet;
import java.util.Set;

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 MataUang
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MataUang_M")
public class MataUang extends BaseMaster {
	@NotNull(message = "Current Kurs To I D R tidak boleh kosong")
	@Column(name = "CurrentKursToIDR", nullable = false)
	@Caption(value = "Current Kurs To I D R")
	private Double currentKursToIDR;

	public void setCurrentKursToIDR(Double currentKursToIDR) {
		this.currentKursToIDR = currentKursToIDR;
	}

	public Double getCurrentKursToIDR() {
		return this.currentKursToIDR;
	}

	@NotNull(message = "Kd Mata Uang tidak boleh kosong")
	@Column(name = "KdMataUang", nullable = false)
	@Caption(value = "Kode Mata Uang")
	private Byte kdMataUang;

	public void setKdMataUang(Byte kdMataUang) {
		this.kdMataUang = kdMataUang;
	}

	public Byte getKdMataUang() {
		return this.kdMataUang;
	}

	@NotNull(message = "Mata Uang tidak boleh kosong")
	@Column(name = "MataUang", nullable = false, length = 50)
	@Caption(value = "Mata Uang")
	private String mataUang;

	public void setMataUang(String mataUang) {
		this.mataUang = mataUang;
	}

	public String getMataUang() {
		return this.mataUang;
	}

	@NotNull(message = "QMata Uang tidak boleh kosong")
	@Column(name = "QMataUang", nullable = false)
	@Caption(value = "QMata Uang")
	private Byte qMataUang;

	public void setqMataUang(Byte qMataUang) {
		this.qMataUang = qMataUang;
	}

	public Byte getqMataUang() {
		return this.qMataUang;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdmatauang") private Set<HargaNettoProdukByKelas>
	 * HargaNettoDiscPasienPulangSet = new HashSet<HargaNettoProdukByKelas>();
	 * 
	 * public Set<HargaNettoProdukByKelas> getHargaNettoDiscPasienPulangSet() {
	 * return HargaNettoDiscPasienPulangSet; }
	 * 
	 * public void setHargaNettoDiscPasienPulangSet(Set<HargaNettoProdukByKelas>
	 * hargaNettoDiscPasienPulangSet) { HargaNettoDiscPasienPulangSet =
	 * hargaNettoDiscPasienPulangSet; }
	 * 
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdmatauang") private Set<HargaNettoProdukByKelas>
	 * HargaNettoProdukByKelasSet = new HashSet<HargaNettoProdukByKelas>();
	 * 
	 * public Set<HargaNettoProdukByKelas> getHargaNettoProdukByKelasSet() {
	 * return HargaNettoProdukByKelasSet; }
	 * 
	 * public void setHargaNettoProdukByKelasSet(Set<HargaNettoProdukByKelas>
	 * hargaNettoProdukByKelasSet) { HargaNettoProdukByKelasSet =
	 * hargaNettoProdukByKelasSet; }
	 * 
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdmatauang") private Set<HargaNettoProdukByKelasD>
	 * HargaNettoProdukByKelasDSet = new HashSet<HargaNettoProdukByKelasD>();
	 * 
	 * public Set<HargaNettoProdukByKelasD> getHargaNettoProdukByKelasDSet() {
	 * return HargaNettoProdukByKelasDSet; }
	 * 
	 * public void setHargaNettoProdukByKelasDSet(Set<HargaNettoProdukByKelasD>
	 * hargaNettoProdukByKelasDSet) { HargaNettoProdukByKelasDSet =
	 * hargaNettoProdukByKelasDSet; }
	 */

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdmatauang") private Set<HargaNettoProdukByTerima>
	 * HargaNettoProdukByTerimaSet = new HashSet<HargaNettoProdukByTerima>();
	 * 
	 * public Set<HargaNettoProdukByTerima> getHargaNettoProdukByTerimaSet() {
	 * return HargaNettoProdukByTerimaSet; }
	 * 
	 * public void setHargaNettoProdukByTerimaSet(Set<HargaNettoProdukByTerima>
	 * hargaNettoProdukByTerimaSet) { HargaNettoProdukByTerimaSet =
	 * hargaNettoProdukByTerimaSet; }
	 */

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdmatauang") private Set<HargaNettoProdukCitoD>
	 * HargaNettoProdukCitoDSet = new HashSet<HargaNettoProdukCitoD>();
	 * 
	 * public Set<HargaNettoProdukCitoD> getHargaNettoProdukCitoDSet() { return
	 * HargaNettoProdukCitoDSet; }
	 * 
	 * public void setHargaNettoProdukCitoDSet(Set<HargaNettoProdukCitoD>
	 * hargaNettoProdukCitoDSet) { HargaNettoProdukCitoDSet =
	 * hargaNettoProdukCitoDSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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