/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rjconsultores.ventaboletos.entidad;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 
 * @author Rafius
 */
@Entity
@SequenceGenerator(name = "PRICING_PUNTOVENTA_SEQ", sequenceName = "PRICING_PUNTOVENTA_SEQ", allocationSize = 1)
@Table(name = "PRICING_PUNTOVENTA")
public class PricingPuntoVenta implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "PRICING_PUNTOVENTA_SEQ")
	@Column(name = "PRICINGPTOVTA_ID")
	private Integer pricingptovtaId;
	@Column(name = "ACTIVO")
	private Integer activo;
	@Column(name = "FECMODIF")
	@Temporal(TemporalType.TIMESTAMP)
	private Date fecmodif;
	@Column(name = "USUARIO_ID")
	private Integer usuarioId;
	@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
	@ManyToOne
	private PuntoVenta puntoVenta;
	@JoinColumn(name = "PRICING_ID", referencedColumnName = "PRICING_ID")
	@ManyToOne
	private Pricing pricing;

	public PricingPuntoVenta() {
	}

	public PricingPuntoVenta(Integer pricingptovtaId) {
		this.pricingptovtaId = pricingptovtaId;
	}

	public Integer getPricingptovtaId() {
		return pricingptovtaId;
	}

	public void setPricingptovtaId(Integer pricingptovtaId) {
		this.pricingptovtaId = pricingptovtaId;
	}

	public Integer getActivo() {
		return activo;
	}

	public void setActivo(Integer activo) {
		this.activo = activo;
	}

	public Date getFecmodif() {
		return fecmodif;
	}

	public void setFecmodif(Date fecmodif) {
		this.fecmodif = fecmodif;
	}

	public Integer getUsuarioId() {
		return usuarioId;
	}

	public void setUsuarioId(Integer usuarioId) {
		this.usuarioId = usuarioId;
	}

	public PuntoVenta getPuntoVenta() {
		return puntoVenta;
	}

	public void setPuntoVenta(PuntoVenta puntoVenta) {
		this.puntoVenta = puntoVenta;
	}

	public Pricing getPricing() {
		return pricing;
	}

	public void setPricing(Pricing pricing) {
		this.pricing = pricing;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (pricingptovtaId != null ? pricingptovtaId.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		if (!(object instanceof PricingPuntoVenta)) {
			return false;
		}
		PricingPuntoVenta other = (PricingPuntoVenta) object;
		if ((this.pricingptovtaId == null && other.pricingptovtaId != null) || (this.pricingptovtaId != null && !this.pricingptovtaId.equals(other.pricingptovtaId))) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "entidad.test.PricingPuntoventa[pricingptovtaId=" + pricingptovtaId + "]";
	}
}
