package com.jasamedika.medifirst2000.entities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "ManajemenPromosi_T")
public class ManajemenPromosi extends BaseTransaction {
	
	@Column(name = "NoPks", nullable = true , length = 200)
	@Caption(value="noPks")
	private String noPks;
	
	@ManyToOne
	@JoinColumn(name = "ObjectJenisMediaFk")
	@Caption(value="Jenis Media")
	private JenisMedia jenisMedia;
	
	@Column(name = "ObjectJenisMediaFk", insertable=false,updatable=false, nullable = true)
	private Integer jenisMediaId;
	
	@Column(name = "JenisMedia", nullable = true , length = 200)
	@Caption(value="JenisMedia")
	private String namaJenisMedia;
	
	@Column(name = "Lokasi", nullable = true , length = 200)
	@Caption(value="Lokasi")
	private String lokasi;
	
	@JsonManagedReference
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "manajemenPromosi")
	@Caption(value = "jadwalPromosiSet")
	private Set<JadwalPromosi> jadwalPromosiSet=new HashSet<JadwalPromosi>();
	
	@Column(name = "NamaFilePks", nullable = true , length = 200)
	@Caption(value="Nama File Pks")
	private String namaFilePks;
	
	@Column(name = "PathFile", nullable = true , length = 200)
	@Caption(value="Path File")
	private String pathFile;
	
	public String getPathFile() {
		return pathFile;
	}

	public void setPathFile(String pathFile) {
		this.pathFile = pathFile;
	}
	
	public String getNoPks() {
		return noPks;
	}

	public void setNoPks(String noPks) {
		this.noPks = noPks;
	}

	public String getLokasi() {
		return lokasi;
	}

	public void setLokasi(String lokasi) {
		this.lokasi = lokasi;
	}

	public String getNamaFilePks() {
		return namaFilePks;
	}

	public void setNamaFilePks(String namaFilePks) {
		this.namaFilePks = namaFilePks;
	}

	public Set<JadwalPromosi> getJadwalPromosiSet() {
		return jadwalPromosiSet;
	}

	public void setJadwalPromosiSet(Set<JadwalPromosi> jadwalPromosiSet) {
		this.jadwalPromosiSet = jadwalPromosiSet;
	}

	public JenisMedia getJenisMedia() {
		return jenisMedia;
	}

	public void setJenisMedia(JenisMedia jenisMedia) {
		this.jenisMedia = jenisMedia;
	}

	public String getNamaJenisMedia() {
		return namaJenisMedia;
	}

	public void setNamaJenisMedia(String namaJenisMedia) {
		this.namaJenisMedia = namaJenisMedia;
	}
	
	
}
