/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.arrebol.apc.model.views;

import com.arrebol.apc.model.enums.ActiveStatus;
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.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "APC_LOAN_EMPLOYEE_ALL_DATA_VIEW")
public class LoanEmployeeAllDataView implements Serializable {

    private static final long serialVersionUID = 1L;

    public LoanEmployeeAllDataView() {
    }

    public LoanEmployeeAllDataView(String id, String name, String idUser, BigDecimal amountLoan, BigDecimal amountToPay, BigDecimal balance, Date createdOn) {
        this.id = id;
        this.name = name;
        this.amountLoan = amountLoan;
        this.amountToPay = amountToPay;
        this.balance = balance;
        this.createdOn = createdOn;
        this.idUser = idUser;
    }

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid2")
    @Column(name = "id", length = 36)
    private String id;

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

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

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

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

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

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

    @Enumerated(EnumType.STRING)
    @Column(name = "loan_employee_status", nullable = false)
    private ActiveStatus loanEmployeeStatus;

    public String getId() {
        return id;
    }

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

    public String getIdUser() {
        return idUser;
    }

    public void setIdIser(String idUser) {
        this.idUser = idUser;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getAmountLoan() {
        return amountLoan;
    }

    public void setAmountLoan(BigDecimal amountLoan) {
        this.amountLoan = amountLoan;
    }

    public BigDecimal getAmountToPay() {
        return amountToPay;
    }

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

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

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

    public ActiveStatus getLoanEmployeeStatus() {
        return loanEmployeeStatus;
    }

    public void setLoanEmployeeStatus(ActiveStatus loanEmployeeStatus) {
        this.loanEmployeeStatus = loanEmployeeStatus;
    }

    @Override
    public String toString() {
        return "LoanEmployeeView{" + "id=" + id + ", name=" + name + "idUser=" + idUser + ", amountLoan=" + amountLoan + ", amountToPay=" + amountToPay + ", balance=" + balance + ", createdOn=" + createdOn + ", loanEmployeeStatus=" + loanEmployeeStatus + '}';
    }
}
