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

/**
 *
 * @author Administrador
 */
@Entity
@SequenceGenerator(name = "TURNO_SEQ", sequenceName = "TURNO_SEQ", allocationSize = 1)
@Table(name = "TURNO")
public class Turno implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "TURNO_SEQ")
    @Column(name = "TURNO_ID")
    private Short turnoId;
    @Column(name = "DESCTURNO")
    private String descturno;
    @Column(name = "FECMODIF")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecmodif;
    @Column(name = "USUARIO_ID")
    private Integer usuarioId;
    @Column(name = "ACTIVO")
    private Boolean activo;

    public Turno() {
    }

    public Turno(Short turnoId) {
        this.turnoId = turnoId;
    }

    public Short getTurnoId() {
        return turnoId;
    }

    public void setTurnoId(Short turnoId) {
        this.turnoId = turnoId;
    }

    public String getDescturno() {
        return descturno;
    }

    public void setDescturno(String descturno) {
        this.descturno = descturno;
    }

    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 Boolean getActivo() {
        return activo;
    }

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

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

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