/*
 * 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.enums.LoanStatus;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Immutable;

/**
 *
 * @author Carlos Janitzio Zavala Lopez <janitzio.zavala@arrebol.com.mx>
 */
@Entity
@Immutable
@Table(name = "APC_CURRENT_CUSTOMER_BY_LOAN_VIEW")
public class CurrentCustomerByLoanView implements Serializable {

    private static final long serialVersionUID = 1867076380925130820L;

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

    @Column(name = "id_user", length = 36)
    private String userId;

    @Column(name = "id_office", length = 36)
    private String officeId;

    @Column(name = "payment", nullable = false)
    private BigDecimal payment;

    @Column(name = "customer_name", length = 100)
    private String customerName;

    @Column(name = "endorsement_name", length = 103)
    private String endorsementName;

    @Enumerated(EnumType.STRING)
    @Column(name = "loan_status")
    private LoanStatus loanStatus;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "created_on", length = 19)
    private Date createdOn;

    @Column(name = "route_name", length = 25)
    private String route;

    public CurrentCustomerByLoanView() {
    }

    /**
     * Complete Constructor.
     *
     * @param loanId
     * @param userId
     * @param officeId
     * @param payment
     * @param customerName
     * @param endorsementName
     * @param loanStatus
     * @param createdOn
     */
    public CurrentCustomerByLoanView(String loanId, String userId, String officeId, BigDecimal payment, String customerName, String endorsementName, LoanStatus loanStatus, Date createdOn) {
        this.loanId = loanId;
        this.userId = userId;
        this.officeId = officeId;
        this.payment = payment;
        this.customerName = customerName;
        this.endorsementName = endorsementName;
        this.loanStatus = loanStatus;
        this.createdOn = createdOn;
    }

    public String getLoanId() {
        return loanId;
    }

    public void setLoanId(String loanId) {
        this.loanId = loanId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getOfficeId() {
        return officeId;
    }

    public void setOfficeId(String officeId) {
        this.officeId = officeId;
    }

    public BigDecimal getPayment() {
        return payment;
    }

    public void setPayment(BigDecimal payment) {
        this.payment = payment;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getEndorsementName() {
        return endorsementName;
    }

    public void setEndorsementName(String endorsementName) {
        this.endorsementName = endorsementName;
    }

    public LoanStatus getLoanStatus() {
        return loanStatus;
    }

    public void setLoanStatus(LoanStatus loanStatus) {
        this.loanStatus = loanStatus;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

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

    public String getRoute() {
        return route;
    }

    public void setRoute(String route) {
        this.route = route;
    }

    @Override
    public String toString() {
        return "CurrentCustomerByLoanView{" + "customerName=" + customerName + ", endorsementName=" + endorsementName + '}';
    }

}
