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.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@SequenceGenerator(name = "PRICING_CTRL_SEQ", sequenceName = "PRICING_CTRL_SEQ", allocationSize = 1)
@Table(name = "PRICING_CTRL")
public class PricingCtrl implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Basic(optional = false)
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "PRICING_CTRL_SEQ")
	@Column(name = "PRICINGCTRL_ID")
	private Integer pricingctrlId;
	
	@Column(name = "ACTIVO")
	private Boolean activo;
	
	@Column(name = "FECMODIF")
	@Temporal(TemporalType.TIMESTAMP)
	private Date fecmodif;
	
	@Column(name = "USUARIO_ID")
	private Integer usuarioId;

	public Integer getPricingctrlId() {
		return pricingctrlId;
	}

	public void setPricingctrlId(Integer pricingctrlId) {
		this.pricingctrlId = pricingctrlId;
	}

	public Boolean getActivo() {
		return activo;
	}

	public void setActivo(Boolean 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() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getPricingctrlId() == null) ? 0 : getPricingctrlId().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof PricingCtrl))
			return false;
		PricingCtrl other = (PricingCtrl) obj;
		if (getPricingctrlId() == null) {
			if (other.getPricingctrlId() != null)
				return false;
		} else if (!getPricingctrlId().equals(other.getPricingctrlId()))
			return false;
		return true;
	}

}
