/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.arrebol.taxiservicios.model.tours;

import com.arrebol.taxiservicios.model.catalog.Location;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.EstatusTour;
import com.arrebol.taxiservicios.model.enums.GenericEnumType;
import com.arrebol.taxiservicios.model.enums.TipoTour;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author Crov
 */
@Entity
@Table(name = "tours")
public class Tours implements Serializable {

   private static final long serialVersionUID = -6653037938225719593L;

   @Id
   @GeneratedValue(generator = "uuid")
   @GenericGenerator(name = "uuid", strategy = "uuid2")
   @Column(name = "id", length = 36)
   private String id;

   @ManyToOne(fetch = FetchType.LAZY, optional = false)
   @JoinColumn(
           name = "id_location",
           referencedColumnName = "id",
           nullable = false
   )
   private Location location;

   @Enumerated(EnumType.STRING)
   @Column(name = "estatus_activo", nullable = false)
   private GenericEnumType estatusActivo;

   @Column(name = "descripcion")
   private String descripcion;

   @Temporal(TemporalType.TIMESTAMP)
   @Column(name = "fecha_inicio")
   private Date fechaInicio;

   @Temporal(TemporalType.TIMESTAMP)
   @Column(name = "fecha_fin")
   private Date fechaFin;

   @Column(name = "numero_espacios")
   private Integer numeroEspacios;

   @Column(name = "numero_reservados")
   private Integer numeroReservados;

   @Column(name = "comentario")
   private String comentario;

   @Column(name = "costo_individual")
   private Double costoIndividual;

   @Column(name = "costo_total")
   private Double costoTotal;

   @Enumerated(EnumType.STRING)
   @Column(name = "estatus", nullable = false)
   private EstatusTour estatus;

   @Enumerated(EnumType.STRING)
   @Column(name = "tipo", nullable = false)
   private TipoTour tipo;

   @Temporal(TemporalType.TIMESTAMP)
   @Column(name = "created_on")
   private Date createdOn;

   @ManyToOne(fetch = FetchType.LAZY, optional = false)
   @JoinColumn(
           name = "created_by",
           referencedColumnName = "id",
           nullable = false
   )
   private User createdBy;

   @Temporal(TemporalType.TIMESTAMP)
   @Column(name = "last_updated_on")
   private Date lastUpdatedOn;

   @ManyToOne(fetch = FetchType.LAZY, optional = true)
   @JoinColumn(
           name = "last_updated_by",
           referencedColumnName = "id",
           nullable = true
   )
   private User lastUpdatedBy;

   public Tours() {
   }

   public Tours(String id) {
      this.id = id;
   }

   public String getId() {
      return id;
   }

   public void setId(String id) {
      this.id = id;
   }

   public Location getLocation() {
      return location;
   }

   public void setLocation(Location location) {
      this.location = location;
   }

   public GenericEnumType getEstatusActivo() {
      return estatusActivo;
   }

   public void setEstatusActivo(GenericEnumType estatusActivo) {
      this.estatusActivo = estatusActivo;
   }

   public String getDescripcion() {
      return descripcion;
   }

   public void setDescripcion(String descripcion) {
      this.descripcion = descripcion;
   }

   public Date getFechaInicio() {
      return fechaInicio;
   }

   public void setFechaInicio(Date fechaInicio) {
      this.fechaInicio = fechaInicio;
   }

   public Date getFechaFin() {
      return fechaFin;
   }

   public void setFechaFin(Date fechaFin) {
      this.fechaFin = fechaFin;
   }

   public Integer getNumeroEspacios() {
      return numeroEspacios;
   }

   public void setNumeroEspacios(Integer numeroEspacios) {
      this.numeroEspacios = numeroEspacios;
   }

   public Integer getNumeroReservados() {
      return numeroReservados;
   }

   public void setNumeroReservados(Integer numeroReservados) {
      this.numeroReservados = numeroReservados;
   }

   public String getComentario() {
      return comentario;
   }

   public void setComentario(String comentario) {
      this.comentario = comentario;
   }

   public EstatusTour getEstatus() {
      return estatus;
   }

   public void setEstatus(EstatusTour estatus) {
      this.estatus = estatus;
   }

   public Date getCreatedOn() {
      return createdOn;
   }

   public void setCreatedOn(Date createdOn) {
      this.createdOn = createdOn;
   }

   public User getCreatedBy() {
      return createdBy;
   }

   public void setCreatedBy(User createdBy) {
      this.createdBy = createdBy;
   }

   public Date getLastUpdatedOn() {
      return lastUpdatedOn;
   }

   public void setLastUpdatedOn(Date lastUpdatedOn) {
      this.lastUpdatedOn = lastUpdatedOn;
   }

   public User getLastUpdatedBy() {
      return lastUpdatedBy;
   }

   public void setLastUpdatedBy(User lastUpdatedBy) {
      this.lastUpdatedBy = lastUpdatedBy;
   }

   public Double getCostoIndividual() {
      return costoIndividual;
   }

   public void setCostoIndividual(Double costoIndividual) {
      this.costoIndividual = costoIndividual;
   }

   public Double getCostoTotal() {
      return costoTotal;
   }

   public void setCostoTotal(Double costoTotal) {
      this.costoTotal = costoTotal;
   }

   public TipoTour getTipo() {
      return tipo;
   }

   public void setTipo(TipoTour tipo) {
      this.tipo = tipo;
   }

}
