/*
 * 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.predio;

import com.arrebol.taxiservicios.model.core.Person;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.EstatusSolicitud;
import com.arrebol.taxiservicios.model.enums.GenericEnumType;
import com.arrebol.taxiservicios.model.enums.PeriodoPago;
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 pc one
 */
@Entity
@Table(name = "solicitud_trasferencia_lote")
public class SolicitudTrasferenciaLote  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 = true)
    @JoinColumn(
            name = "id_cliente",
            referencedColumnName = "id",
            nullable = true
    )
    private Person cliente;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_lote_origen",
            referencedColumnName = "id",
            nullable = false
    )
    private Lote loteOrigen;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_lote_destino",
            referencedColumnName = "id",
            nullable = false
    )
    private Lote loteDestino;
    
    @Enumerated(EnumType.STRING)
    @Column(name = "estatus_activo", nullable = true)
    private GenericEnumType estatusActivo;
    
    @Enumerated(EnumType.STRING)
    @Column(name = "estatus_solicitud", nullable = false)
    private EstatusSolicitud estatusSolicitud;
    
    @Column(name = "anticipo_trasferencia", nullable = true)
    private Double anticipoTrasferencia;
    
    @Enumerated(EnumType.STRING)
    @Column(name = "periodo_pago", nullable = true)
    private PeriodoPago periodoPago;        
    
    @Column(name = "numero_pagos", nullable = true)
    private Integer numeroPagos;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "fecha_incio_pagos", length = 19)
    private Date fechaIncioPagos;
    
    @Column(name = "monto_pago_extra", nullable = true)
    private Double montoPagoExtra;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "fecha_pagos_extra", length = 19)
    private Date fechaPagosExtra;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "created_by",
            referencedColumnName = "id",
            nullable = false
    )
    private User createdBy;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "created_on", length = 19)
    private Date createdOn;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    @JoinColumn(
            name = "last_updated_by",
            referencedColumnName = "id",
            nullable = true
    )
    private User lastUpdatedBy;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "last_updated_on", length = 19, nullable = true)
    private Date lastUpdatedOn;

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

    public SolicitudTrasferenciaLote() {
    }

    public String getId() {
        return id;
    }

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

    public Person getCliente() {
        return cliente;
    }

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

    public Lote getLoteOrigen() {
        return loteOrigen;
    }

    public void setLoteOrigen(Lote loteOrigen) {
        this.loteOrigen = loteOrigen;
    }

    public Lote getLoteDestino() {
        return loteDestino;
    }

    public void setLoteDestino(Lote loteDestino) {
        this.loteDestino = loteDestino;
    }

    public GenericEnumType getEstatusActivo() {
        return estatusActivo;
    }

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

    public EstatusSolicitud getEstatusSolicitud() {
        return estatusSolicitud;
    }

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

    public Double getAnticipoTrasferencia() {
        return anticipoTrasferencia;
    }

    public void setAnticipoTrasferencia(Double anticipoTrasferencia) {
        this.anticipoTrasferencia = anticipoTrasferencia;
    }

    public PeriodoPago getPeriodoPago() {
        return periodoPago;
    }

    public void setPeriodoPago(PeriodoPago periodoPago) {
        this.periodoPago = periodoPago;
    }

    public Integer getNumeroPagos() {
        return numeroPagos;
    }

    public void setNumeroPagos(Integer numeroPagos) {
        this.numeroPagos = numeroPagos;
    }

    public Date getFechaIncioPagos() {
        return fechaIncioPagos;
    }

    public void setFechaIncioPagos(Date fechaIncioPagos) {
        this.fechaIncioPagos = fechaIncioPagos;
    }

    public Double getMontoPagoExtra() {
        return montoPagoExtra;
    }

    public void setMontoPagoExtra(Double montoPagoExtra) {
        this.montoPagoExtra = montoPagoExtra;
    }

    public Date getFechaPagosExtra() {
        return fechaPagosExtra;
    }

    public void setFechaPagosExtra(Date fechaPagosExtra) {
        this.fechaPagosExtra = fechaPagosExtra;
    }

    public User getCreatedBy() {
        return createdBy;
    }

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

    public Date getCreatedOn() {
        return createdOn;
    }

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

    public User getLastUpdatedBy() {
        return lastUpdatedBy;
    }

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

    public Date getLastUpdatedOn() {
        return lastUpdatedOn;
    }

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