/*
 * 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 java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
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 Usuario
 */
@Entity
@Table(name = "detalle_lote_urbanizacion")
public class DetalleLoteUrbanizacion implements Serializable{
    
    @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_lote",
            referencedColumnName = "id",
            nullable = false
    )
    private Lote lote;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_urbanizacion",
            referencedColumnName = "id",
            nullable = false
    )
    private Urbanizacion urbanizacion;
    
    @Column(name="saldo_anterior")
    private Double saldoAnterior;
    
    @Column(name ="saldo_pagado")
    private Double saldoPagado;
    
    @Column(name ="saldo_nuevo")
    private Double saldoNuevo;
    
    @Column(name ="folio")
    private String folio;
    
    @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)
    private Date lastUpdatedOn;

    public DetalleLoteUrbanizacion() {
    }

    public DetalleLoteUrbanizacion(String id, Lote lote, Urbanizacion urbanizacion, Double saldoAnterior, Double saldoPagado, Double saldoNuevo, User createdBy, Date createdOn, User lastUpdatedBy, Date lastUpdatedOn) {
        this.id = id;
        this.lote = lote;
        this.urbanizacion = urbanizacion;
        this.saldoAnterior = saldoAnterior;
        this.saldoPagado = saldoPagado;
        this.saldoNuevo = saldoNuevo;
        this.createdBy = createdBy;
        this.createdOn = createdOn;
        this.lastUpdatedBy = lastUpdatedBy;
        this.lastUpdatedOn = lastUpdatedOn;
    }
    
    
    

    public String getId() {
        return id;
    }

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

    public Lote getLote() {
        return lote;
    }

    public void setLote(Lote lote) {
        this.lote = lote;
    }

    public Urbanizacion getUrbanizacion() {
        return urbanizacion;
    }

    public void setUrbanizacion(Urbanizacion urbanizacion) {
        this.urbanizacion = urbanizacion;
    }

    public Double getSaldoAnterior() {
        return saldoAnterior;
    }

    public void setSaldoAnterior(Double saldoAnterior) {
        this.saldoAnterior = saldoAnterior;
    }

    public Double getSaldoPagado() {
        return saldoPagado;
    }

    public void setSaldoPagado(Double saldoPagado) {
        this.saldoPagado = saldoPagado;
    }

    public Double getSaldoNuevo() {
        return saldoNuevo;
    }

    public void setSaldoNuevo(Double saldoNuevo) {
        this.saldoNuevo = saldoNuevo;
    }

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

    public String getFolio() {
        return folio;
    }

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