package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.Date;

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 PersenHargaJualProduk
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "PersenHargaJualProduk_M")
public class PersenHargaJualProduk extends BaseMaster {
	@NotNull(message = "Jenis Harga Netto tidak boleh kosong")
	@Column(name = "JenisHargaNetto", nullable = false)
	@Caption(value = "Jenis Harga Netto")
	private Byte jenisHargaNetto;

	public void setJenisHargaNetto(Byte jenisHargaNetto) {
		this.jenisHargaNetto = jenisHargaNetto;
	}

	public Byte getJenisHargaNetto() {
		return this.jenisHargaNetto;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectAsalProdukFk")
	@NotNull(message = "Kd Asal Produk tidak boleh kosong")

	@Caption(value = "Object Asal Produk")
	private AsalProduk asalProduk;

	public void setAsalProduk(AsalProduk asalProduk) {
		this.asalProduk = asalProduk;
	}

	public AsalProduk getAsalProduk() {
		return this.asalProduk;
	}

	@Column(name = "ObjectAsalProdukFk", insertable = false, updatable = false)
	private Integer asalProdukId;

	@ManyToOne
	@JoinColumn(name = "ObjectJenisTransaksiFk")
	@NotNull(message = "Kd Jenis Transaksi tidak boleh kosong")

	@Caption(value = "Object Jenis Transaksi")
	private JenisTransaksi jenisTransaksi;

	public void setJenisTransaksi(JenisTransaksi jenisTransaksi) {
		this.jenisTransaksi = jenisTransaksi;
	}

	public JenisTransaksi getJenisTransaksi() {
		return this.jenisTransaksi;
	}

	@Column(name = "ObjectJenisTransaksiFk", insertable = false, updatable = false, nullable = false)
	private Integer jenisTransaksiId;

	@ManyToOne
	@JoinColumn(name = "ObjectKelasFk")
	@NotNull(message = "Kd Kelas tidak boleh kosong")

	@Caption(value = "Object Kelas")
	private DetailKamar kelas;

	public void setKelas(DetailKamar kelas) {
		this.kelas = kelas;
	}

	public DetailKamar getKelas() {
		return this.kelas;
	}

	@Column(name = "ObjectKelasFk", insertable = false, updatable = false, nullable = false)
	private Integer kelasId;

	@ManyToOne
	@JoinColumn(name = "ObjectKelasPembandingFk")

	@Caption(value = "Object Kelas Pembanding")
	private DetailKamar kelasPembanding;

	public void setKelasPembanding(DetailKamar kelasPembanding) {
		this.kelasPembanding = kelasPembanding;
	}

	public DetailKamar getKelasPembanding() {
		return this.kelasPembanding;
	}

	@Column(name = "ObjectKelasPembandingFk", insertable = false, updatable = false, nullable = false)
	private Integer kelasPembandingId;

	@ManyToOne
	@JoinColumn(name = "ObjectKelasTarifFk")
	@NotNull(message = "Kd Kelas Tarif tidak boleh kosong")

	@Caption(value = "Object Kelas Tarif")
	private DetailKamar kelasTarif;

	public void setKelasTarif(DetailKamar kelasTarif) {
		this.kelasTarif = kelasTarif;
	}

	public DetailKamar getKelasTarif() {
		return this.kelasTarif;
	}

	@Column(name = "ObjectKelasTarifFk", insertable = false, updatable = false)
	private Integer kelasTarifId;

	@ManyToOne
	@JoinColumn(name = "ObjectKelompokPasienFk")
	@NotNull(message = "Kd Kelompok Pasien tidak boleh kosong")

	@Caption(value = "Object Kelompok Pasien")
	private KelompokPasien kelompokPasien;

	public void setKelompokPasien(KelompokPasien kelompokPasien) {
		this.kelompokPasien = kelompokPasien;
	}

	public KelompokPasien getKelompokPasien() {
		return this.kelompokPasien;
	}

	@Column(name = "ObjectKelompokPasienFk", insertable = false, updatable = false, nullable = false)
	private Integer kelompokPasienId;

	@NotNull(message = "Kd Penjamin Pasien tidak boleh kosong")
	@Column(name = "KdPenjaminPasien", nullable = false)
	@Caption(value = "Kode Penjamin Pasien")
	private short kdPenjaminPasien;

	public void setKdPenjaminPasien(short kdPenjaminPasien) {
		this.kdPenjaminPasien = kdPenjaminPasien;
	}

	public short getKdPenjaminPasien() {
		return this.kdPenjaminPasien;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectRangeFk")
	@NotNull(message = "Kd Range tidak boleh kosong")

	@Caption(value = "Object Range")
	private Range range;

	public void setRange(Range range) {
		this.range = range;
	}

	public Range getRange() {
		return this.range;
	}

	@Column(name = "ObjectRangeFk", insertable = false, updatable = false, nullable = false)
	private Integer rangeId;

	@NotNull(message = "Persen Up Harga Satuan tidak boleh kosong")
	@Column(name = "PersenUpHargaSatuan", nullable = false)
	@Caption(value = "Persen Up Harga Satuan")
	private Double persenUpHargaSatuan;

	public void setPersenUpHargaSatuan(Double persenUpHargaSatuan) {
		this.persenUpHargaSatuan = persenUpHargaSatuan;
	}

	public Double getPersenUpHargaSatuan() {
		return this.persenUpHargaSatuan;
	}

	@Column(name = "TglBerlakuAkhir", nullable = true)
	@Caption(value = "Tanggal Berlaku Akhir")
	private Date tglBerlakuAkhir;

	public void setTglBerlakuAkhir(Date tglBerlakuAkhir) {
		this.tglBerlakuAkhir = tglBerlakuAkhir;
	}

	public Date getTglBerlakuAkhir() {
		return this.tglBerlakuAkhir;
	}

	@NotNull(message = "Tgl Berlaku Awal tidak boleh kosong")
	@Column(name = "TglBerlakuAwal", nullable = false)
	@Caption(value = "Tanggal Berlaku Awal")
	private Date tglBerlakuAwal;

	public void setTglBerlakuAwal(Date tglBerlakuAwal) {
		this.tglBerlakuAwal = tglBerlakuAwal;
	}

	public Date getTglBerlakuAwal() {
		return this.tglBerlakuAwal;
	}

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

	public Integer getId() {

		return id;
	}

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