/*
 * Arrebol Consultancy copyright.
 * 
 * This code belongs to Arrebol Consultancy
 * its use, redistribution or modification are prohibited 
 * without written authorization from Arrebol Consultancy.
 */
package com.arrebol.apc.model.views;

import com.arrebol.apc.model.core.Office;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import org.hibernate.annotations.Immutable;

/**
 *
 * @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
 */
@Entity
@Immutable
@Table(name = "APC_CUSTOMERS_WITHOUT_RENOVATION_VIEW")
public class CustomerWithoutRenovationView implements Serializable {

    private static final long serialVersionUID = 3731003393000465083L;

    @Id
    @Column(name = "id", length = 36)
    private String id;

    @Column(name = "available_person")
    private String personName;

    @Column(name = "route_name")
    private String routeName;

    @Column(name = "last_loan")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date lastLoan;
    
    @Column(name = "amount_paid")
    private String amountPaid;
    
    @Column(name = "amount_to_pay")
    private String amountToPay;
    
    @Column(name = "saldo_insoluto")
    private String saldoInsoluto;

    @Column(name = "action_number")
    private String actionNumber;
    
    @Column(name = "num_fee")
    private String numFee;
    
    @Column(name = "address_home")
    private String addressHome;
    
    @Column(name = "address_business")
    private String addressBusiness;
    
    @Column(name = "company_name")
    private String companyName;
    
        
    

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_office",
            referencedColumnName = "id",
            nullable = false
    )
    private Office office;

    @Column(name = "str_payment_date", length = 22)
    private String strPaymentDate;

    public String getId() {
        return id;
    }

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

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public String getRouteName() {
        return routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    public Date getLastLoan() {
        return lastLoan;
    }

    public void setLastLoan(Date lastLoan) {
        this.lastLoan = lastLoan;
    }

    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }

    public String getStrPaymentDate() {
        return strPaymentDate;
    }

    public void setStrPaymentDate(String strPaymentDate) {
        this.strPaymentDate = strPaymentDate;
    }

    public String getAmountPaid() {
        return amountPaid;
    }

    public void setAmountPaid(String amountPaid) {
        this.amountPaid = amountPaid;
    }

    public String getAmountToPay() {
        return amountToPay;
    }

    public void setAmountToPay(String amountToPay) {
        this.amountToPay = amountToPay;
    }

    public String getSaldoInsoluto() {
        return saldoInsoluto;
    }

    public void setSaldoInsoluto(String saldoInsoluto) {
        this.saldoInsoluto = saldoInsoluto;
    }

    public String getActionNumber() {
        return actionNumber;
    }

    public void setActionNumber(String actionNumber) {
        this.actionNumber = actionNumber;
    }

    public String getNumFee() {
        return numFee;
    }

    public void setNumFee(String numFee) {
        this.numFee = numFee;
    }

    public String getAddressHome() {
        return addressHome;
    }

    public void setAddressHome(String addressHome) {
        this.addressHome = addressHome;
    }

    public String getAddressBusiness() {
        return addressBusiness;
    }

    public void setAddressBusiness(String addressBusiness) {
        this.addressBusiness = addressBusiness;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    
    

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 61 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final CustomerWithoutRenovationView other = (CustomerWithoutRenovationView) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

}
