/*
 * 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.User;
import com.arrebol.taxiservicios.model.enums.TipoCaseacionFolio;
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 = "folios_cancelados")
public class FoliosCancelados  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;
    
    @Column(name = "folio", nullable = true)
    private String folio;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_predio",
            referencedColumnName = "id",
            nullable = false
    )
    private Predio predio;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_abono_lote",
            referencedColumnName = "id",
            nullable = false
    )
    private AbonoLote abonoLote;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_user_elimino",
            referencedColumnName = "id",
            nullable = false
    )
    private User userElimino;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "fecha_eliminacion")
    private Date fechaEliminacion;
    
    @Enumerated(EnumType.STRING)
    @Column(name = "tipo_caseacion", nullable = false)
    private TipoCaseacionFolio tipoCaseacion;
    
    @Column(name = "motivo_caseacion", nullable = true)
    private String motivoCaseacion;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "created_on", length = 19)
    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", length = 19)
    private Date lastUpdatedOn;

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

    public FoliosCancelados() {
    }

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

    public String getId() {
        return id;
    }

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

    public String getFolio() {
        return folio;
    }

    public void setFolio(String folio) {
        this.folio = folio;
    }

    public Predio getPredio() {
        return predio;
    }

    public void setPredio(Predio predio) {
        this.predio = predio;
    }

    public AbonoLote getAbonoLote() {
        return abonoLote;
    }

    public void setAbonoLote(AbonoLote abonoLote) {
        this.abonoLote = abonoLote;
    }

    public User getUserElimino() {
        return userElimino;
    }

    public void setUserElimino(User userElimino) {
        this.userElimino = userElimino;
    }

    public Date getFechaEliminacion() {
        return fechaEliminacion;
    }

    public void setFechaEliminacion(Date fechaEliminacion) {
        this.fechaEliminacion = fechaEliminacion;
    }

    public TipoCaseacionFolio getTipoCaseacion() {
        return tipoCaseacion;
    }

    public void setTipoCaseacion(TipoCaseacionFolio tipoCaseacion) {
        this.tipoCaseacion = tipoCaseacion;
    }

    public String getMotivoCaseacion() {
        return motivoCaseacion;
    }

    public void setMotivoCaseacion(String motivoCaseacion) {
        this.motivoCaseacion = motivoCaseacion;
    }

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