/*
 * 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.util.Date;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
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_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW")
public class LoanInPendingStatusToDeliveryView implements Serializable {

    private static final long serialVersionUID = 6435962914845336418L;

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

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

    @Column(name = "str_created_on", length = 22)
    private String strCreatedOn;

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

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

    @Column(name = "user_name", length = 103)
    private String userName;

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

    /**
     *
     */
    public LoanInPendingStatusToDeliveryView() {
    }

    /**
     *
     * @param idLoan
     * @param payment
     * @param strCreatedOn
     * @param customerName
     * @param endorsementName
     * @param userName
     * @param createdOn
     */
    public LoanInPendingStatusToDeliveryView(String idLoan, Double payment, String strCreatedOn, String customerName, String endorsementName, String userName, Date createdOn) {
        this.idLoan = idLoan;
        this.payment = payment;
        this.strCreatedOn = strCreatedOn;
        this.customerName = customerName;
        this.endorsementName = endorsementName;
        this.userName = userName;
        this.createdOn = createdOn;
    }

    public String getIdLoan() {
        return idLoan;
    }

    public void setIdLoan(String idLoan) {
        this.idLoan = idLoan;
    }

    public Double getPayment() {
        return payment;
    }

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

    public String getStrCreatedOn() {
        return strCreatedOn;
    }

    public void setStrCreatedOn(String strCreatedOn) {
        this.strCreatedOn = strCreatedOn;
    }

    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 String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

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

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

}
