/*
 * 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 java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.Immutable;

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

    private static final long serialVersionUID = 8450662914845336486L;

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

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

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

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

    @Column(name = "customer_address", length = 150)
    private String customerAddress;

    @Column(name = "thumbnail", length = 250)
    private String thumbnail;

    @Column(name = "icon", length = 5)
    private String icon;

    @Column(name = "amount_to_delivery")
    private BigDecimal amountToDelivery;

    @Column(name = "discount")
    private BigDecimal discount;

    @Column(name = "opening")
    private Integer opening;

    @Column(name = "payment")
    private BigDecimal payment;

    @Column(name = "total_last_loan")
    private BigDecimal totalLastLoan;

    public LoanToDeliveryByCertifierView() {
    }

    public String getId() {
        return id;
    }

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

    public String getIdOldLoan() {
        return idOldLoan;
    }

    public void setIdOldLoan(String idOldLoan) {
        this.idOldLoan = idOldLoan;
    }

    public String getUserId() {
        return userId;
    }

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

    public String getCustomerName() {
        return customerName;
    }

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

    public String getCustomerAddress() {
        return customerAddress;
    }

    public void setCustomerAddress(String customerAddress) {
        this.customerAddress = customerAddress;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public BigDecimal getAmountToDelivery() {
        return amountToDelivery;
    }

    public void setAmountToDelivery(BigDecimal amountToDelivery) {
        this.amountToDelivery = amountToDelivery;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public Integer getOpening() {
        return opening;
    }

    public void setOpening(Integer opening) {
        this.opening = opening;
    }

    public BigDecimal getPayment() {
        return payment;
    }

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

    public BigDecimal getTotalLastLoan() {
        return totalLastLoan;
    }

    public void setTotalLastLoan(BigDecimal totalLastLoan) {
        this.totalLastLoan = totalLastLoan;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * 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 LoanToDeliveryByCertifierView other = (LoanToDeliveryByCertifierView) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

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

}
