/*
 * 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.core.Person;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.GenericEnumType;
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 = "espacios_tour")
public class EspaciosTour 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;

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

   @ManyToOne(fetch = FetchType.LAZY, optional = false)
   @JoinColumn(
           name = "id_tour",
           referencedColumnName = "id",
           nullable = false
   )
   private Tours tour;

   @ManyToOne(fetch = FetchType.LAZY, optional = true)
   @JoinColumn(
           name = "id_cliente",
           referencedColumnName = "id",
           nullable = true
   )
   private Person cliente;

   @ManyToOne(fetch = FetchType.LAZY, optional = true)
   @JoinColumn(
           name = "id_cliente_acompanante",
           referencedColumnName = "id",
           nullable = true
   )
   private Person acompanante;

   @ManyToOne(fetch = FetchType.LAZY, optional = true)
   @JoinColumn(
           name = "id_cliente_pago",
           referencedColumnName = "id",
           nullable = true
   )
   private Person clientePago;

   @ManyToOne(fetch = FetchType.LAZY, optional = true)
   @JoinColumn(
           name = "id_detalles_pago_espacios",
           referencedColumnName = "id",
           nullable = true
   )
   private DetallesPagoEspacios detallesPagoEspacios;

   @Column(name = "espacio_cliente_pago")
   private Boolean espacioClientePago;

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

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

   @Column(name = "consecutivo")
   private int consecutivo;

   @Column(name = "costo")
   private Double costo;

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

   @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 EspaciosTour() {
   }

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

   public String getId() {
      return id;
   }

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

   public GenericEnumType getEstatusActivo() {
      return estatusActivo;
   }

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

   public Tours getTour() {
      return tour;
   }

   public void setTour(Tours tour) {
      this.tour = tour;
   }

   public Person getCliente() {
      return cliente;
   }

   public void setCliente(Person cliente) {
      this.cliente = cliente;
   }

   public Person getAcompanante() {
      return acompanante;
   }

   public void setAcompanante(Person acompanante) {
      this.acompanante = acompanante;
   }

   public Person getClientePago() {
      return clientePago;
   }

   public void setClientePago(Person clientePago) {
      this.clientePago = clientePago;
   }

   public DetallesPagoEspacios getDetallesPagoEspacios() {
      return detallesPagoEspacios;
   }

   public void setDetallesPagoEspacios(DetallesPagoEspacios detallesPagoEspacios) {
      this.detallesPagoEspacios = detallesPagoEspacios;
   }

   public Boolean getEspacioClientePago() {
      return espacioClientePago;
   }

   public void setEspacioClientePago(Boolean espacioClientePago) {
      this.espacioClientePago = espacioClientePago;
   }

   public GenericEnumType getEstatusEspacio() {
      return estatusEspacio;
   }

   public void setEstatusEspacio(GenericEnumType estatusEspacio) {
      this.estatusEspacio = estatusEspacio;
   }

   public String getComentarios() {
      return comentarios;
   }

   public void setComentarios(String comentarios) {
      this.comentarios = comentarios;
   }

   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 int getConsecutivo() {
      return consecutivo;
   }

   public void setConsecutivo(int consecutivo) {
      this.consecutivo = consecutivo;
   }

   public Double getCosto() {
      return costo;
   }

   public void setCosto(Double costo) {
      this.costo = costo;
   }

   public String getObservacion() {
      return observacion;
   }

   public void setObservacion(String observacion) {
      this.observacion = observacion;
   }

}
