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;

@Entity
@SequenceGenerator(name = "GP_PRICING_GESTAO_SEQ", sequenceName = "GP_PRICING_GESTAO_SEQ", allocationSize = 1)
@Table(name = "GP_PRICING_GESTAO")
public class GP_PricingGestao implements Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "GP_PRICING_GESTAO_SEQ")
	@Column(name = "PRICINGGESTAO_ID")
	private Integer pricinggestaoId;
	@JoinColumn(name = "PRICING_ID", referencedColumnName = "PRICING_ID")
	@ManyToOne
	private GP_Pricing pricing;
	@Column(name = "CORRIDA_ID")
	private Integer corridaId;
	@Column(name = "FECCORRIDA")
	@Temporal(TemporalType.DATE)
	private Date feccorrida;
	@Column(name = "ACTIVO")
	private Integer activo;
	@Column(name = "FECMODIF")
	@Temporal(TemporalType.TIMESTAMP)
	private Date fecmodif;
	@Column(name = "USUARIO_ID")
	private Integer usuarioId;

	public GP_PricingGestao() {
	}

	public Integer getPricinggestaoId() {
		return pricinggestaoId;
	}

	public void setPricinggestaoId(Integer pricinggestaoId) {
		this.pricinggestaoId = pricinggestaoId;
	}

	public GP_Pricing getPricing() {
		return pricing;
	}

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

	public Integer getCorridaId() {
		return corridaId;
	}

	public void setCorridaId(Integer corridaId) {
		this.corridaId = corridaId;
	}

	public Date getFeccorrida() {
		return feccorrida;
	}

	public void setFeccorrida(Date feccorrida) {
		this.feccorrida = feccorrida;
	}

	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;
	}

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

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

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