/*
 * 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.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;

/**
 *
 * @author Rafius
 */
@Entity
@Table(name = "DEPOSITO_BANCARIO")
@SequenceGenerator(name = "DEPOSITO_BANCARIO_SEQ", sequenceName = "DEPOSITO_BANCARIO_SEQ", allocationSize = 1)
public class DepositoBancario implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "DEPOSITO_BANCARIO_SEQ")
    @Column(name = "DEPOSITOBANCARIO_ID")
    private Long depositobancarioId;
    @Column(name = "PUNTOVENTA_ID")
    private Integer puntoventaId;
    @Column(name = "IMPORTE")
    private BigDecimal importe;
    @Column(name = "FORMAPAGO_ID")
    private Integer formapagoId;
    @Column(name = "BANCO_ID")
    private Integer bancoId;
    @Column(name = "FECDEPOSITO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecdeposito;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "ACTIVO")
    private Boolean activo;

    public DepositoBancario() {
    }

    public DepositoBancario(Long depositobancarioId) {
        this.depositobancarioId = depositobancarioId;
    }

    public Long getDepositobancarioId() {
        return depositobancarioId;
    }

    public void setDepositobancarioId(Long depositobancarioId) {
        this.depositobancarioId = depositobancarioId;
    }

    public Integer getPuntoventaId() {
        return puntoventaId;
    }

    public void setPuntoventaId(Integer puntoventaId) {
        this.puntoventaId = puntoventaId;
    }

    public BigDecimal getImporte() {
        return importe;
    }

    public void setImporte(BigDecimal importe) {
        this.importe = importe;
    }

    public Integer getFormapagoId() {
        return formapagoId;
    }

    public void setFormapagoId(Integer formapagoId) {
        this.formapagoId = formapagoId;
    }

    public Integer getBancoId() {
        return bancoId;
    }

    public void setBancoId(Integer bancoId) {
        this.bancoId = bancoId;
    }

    public Date getFecdeposito() {
        return fecdeposito;
    }

    public void setFecdeposito(Date fecdeposito) {
        this.fecdeposito = fecdeposito;
    }

    public Integer getUsuarioId() {
        return usuarioId;
    }

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

    public Date getFecmodif() {
        return fecmodif;
    }

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

    public Boolean getActivo() {
        return activo;
    }

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

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (depositobancarioId != null ? depositobancarioId.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 DepositoBancario)) {
            return false;
        }
        DepositoBancario other = (DepositoBancario) object;
        if ((this.depositobancarioId == null && other.depositobancarioId != null) || (this.depositobancarioId != null && !this.depositobancarioId.equals(other.depositobancarioId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.rjconsultores.ventaboletos.entidad.DepositoBancario[depositobancarioId=" + depositobancarioId + "]";
    }
}
