/*
 * 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.math.BigDecimal;
import java.util.Date;
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 = "PARAM_COSTO_TARJETA_SEQ", sequenceName = "PARAM_COSTO_TARJETA_SEQ", allocationSize=1)
@Table(name = "PARAM_COSTO_TARJETA")
public class ParamCostoTarjeta implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "PARAM_COSTO_TARJETA_SEQ")
    @Column(name = "PARAMCOSTOTARJETA_ID")
    private Integer paramcostotarjetaId;
    @Column(name = "VALCOSTOINICIAL")
    private BigDecimal valcostoinicial;
    @Column(name = "ACTIVO")
    private Boolean activo;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;
    @JoinColumn(name = "EMPRESA_ID", referencedColumnName = "EMPRESA_ID")
    @ManyToOne
    private Empresa empresa;

    public ParamCostoTarjeta() {
    }

    public ParamCostoTarjeta(Integer paramcostotarjetaId) {
        this.paramcostotarjetaId = paramcostotarjetaId;
    }

    public Integer getParamcostotarjetaId() {
        return paramcostotarjetaId;
    }

    public void setParamcostotarjetaId(Integer paramcostotarjetaId) {
        this.paramcostotarjetaId = paramcostotarjetaId;
    }

    public BigDecimal getValcostoinicial() {
        return valcostoinicial;
    }

    public void setValcostoinicial(BigDecimal valcostoinicial) {
        this.valcostoinicial = valcostoinicial;
    }

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

    public Empresa getEmpresa() {
        return empresa;
    }

    public void setEmpresa(Empresa empresa) {
        this.empresa = empresa;
    }

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

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ParamCostoTarjeta)) {
            return false;
        }
        ParamCostoTarjeta other = (ParamCostoTarjeta) object;
        if ((this.paramcostotarjetaId == null && other.paramcostotarjetaId != null) || (this.paramcostotarjetaId != null && !this.paramcostotarjetaId.equals(other.paramcostotarjetaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "te.ParamCostoTarjeta[paramcostotarjetaId=" + paramcostotarjetaId + "]";
    }
}
