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

import com.arrebol.taxiservicios.model.catalog.Location;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.EstatusSolicitud;
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 Oscar
 */
@Entity
@Table(name = "solicitud_devolucion_detelle_pago_poliza")
public class SolicitudDevolucionDetellePagoPoliza 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;

   @ManyToOne(fetch = FetchType.LAZY, optional = false)
   @JoinColumn(
           name = "id_detalle_pago_solicitud",
           referencedColumnName = "id",
           nullable = false
   )
   private DetellePagoPoliza detallePagoSolicitud;

   @ManyToOne(fetch = FetchType.LAZY, optional = true)
   @JoinColumn(
           name = "id_detalle_pago_devolucion",
           referencedColumnName = "id",
           nullable = true
   )
   private DetellePagoPoliza detallePagoDevolucion;

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

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

   @Enumerated(EnumType.STRING)
   @Column(name = "estatus_solicitud", nullable = false)
   private EstatusSolicitud estatusSolicitud;

   @Column(name = "monto_devolucion")
   private Double montoDevolucion;

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

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

   public SolicitudDevolucionDetellePagoPoliza(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 DetellePagoPoliza getDetallePagoSolicitud() {
      return detallePagoSolicitud;
   }

   public void setDetallePagoSolicitud(DetellePagoPoliza detallePagoSolicitud) {
      this.detallePagoSolicitud = detallePagoSolicitud;
   }

   public DetellePagoPoliza getDetallePagoDevolucion() {
      return detallePagoDevolucion;
   }

   public void setDetallePagoDevolucion(DetellePagoPoliza detallePagoDevolucion) {
      this.detallePagoDevolucion = detallePagoDevolucion;
   }

   public User getUsuarioSolicito() {
      return usuarioSolicito;
   }

   public void setUsuarioSolicito(User usuarioSolicito) {
      this.usuarioSolicito = usuarioSolicito;
   }

   public User getUsuarioCorte() {
      return usuarioCorte;
   }

   public void setUsuarioCorte(User usuarioCorte) {
      this.usuarioCorte = usuarioCorte;
   }

   public EstatusSolicitud getEstatusSolicitud() {
      return estatusSolicitud;
   }

   public void setEstatusSolicitud(EstatusSolicitud estatusSolicitud) {
      this.estatusSolicitud = estatusSolicitud;
   }

   public Double getMontoDevolucion() {
      return montoDevolucion;
   }

   public void setMontoDevolucion(Double montoDevolucion) {
      this.montoDevolucion = montoDevolucion;
   }

   public String getComentario() {
      return comentario;
   }

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

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

}
