/*
 * 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.EstatusPagoMultiple;
import com.arrebol.taxiservicios.model.enums.MetodoPago;
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 = "historial_abono_multiple")
public class HistorialAbonoMultiple 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", nullable = false)
   private EstatusPagoMultiple estatus;

   @ManyToOne(fetch = FetchType.LAZY, optional = false)
   @JoinColumn(
           name = "id_poliza",
           referencedColumnName = "id",
           nullable = false
   )
   private Poliza poliza;

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

   @Temporal(TemporalType.TIMESTAMP)
   @Column(name = "fecha_pago")
   private Date fechaPago;

   @Enumerated(EnumType.STRING)
   @Column(name = "metodo_pago", nullable = true)
   private MetodoPago metodoPago;

   @Column(name = "total_pago", nullable = true)
   private Double totalPago;

   @Column(name = "folios", nullable = true)
   private String folios;

   @Column(name = "detalle", nullable = true)
   private String detalle;

   @Column(name = "cometario", nullable = true)
   private String cometario;

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

   public HistorialAbonoMultiple(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 Poliza getPoliza() {
      return poliza;
   }

   public void setPoliza(Poliza poliza) {
      this.poliza = poliza;
   }

   public User getCobro() {
      return cobro;
   }

   public void setCobro(User cobro) {
      this.cobro = cobro;
   }

   public Double getTotalPago() {
      return totalPago;
   }

   public void setTotalPago(Double totalPago) {
      this.totalPago = totalPago;
   }

   public String getFolios() {
      return folios;
   }

   public void setFolios(String folios) {
      this.folios = folios;
   }

   public String getDetalle() {
      return detalle;
   }

   public void setDetalle(String detalle) {
      this.detalle = detalle;
   }

   public String getCometario() {
      return cometario;
   }

   public void setCometario(String cometario) {
      this.cometario = cometario;
   }

   public EstatusPagoMultiple getEstatus() {
      return estatus;
   }

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

   public Date getFechaPago() {
      return fechaPago;
   }

   public void setFechaPago(Date fechaPago) {
      this.fechaPago = fechaPago;
   }

   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 MetodoPago getMetodoPago() {
      return metodoPago;
   }

   public void setMetodoPago(MetodoPago metodoPago) {
      this.metodoPago = metodoPago;
   }

}
