/*
 * 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.math.BigDecimal;
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 org.hibernate.annotations.Immutable;

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

    private static final long serialVersionUID = 3055231364366461069L;
    
    @Id
    @Column(name = "id", length = 36)
    private String id;
    
    @Column(name = "username")
    private String userName;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_office",
            referencedColumnName = "id",
            nullable = false
    )
    private Office office;
    
    @Column(name = "closing_monday")
    private BigDecimal closingMonday;
    
    @Column(name = "expense_monday")
    private BigDecimal expenseMonday;
    
    @Column(name = "money_daily_today_monday")
    private BigDecimal moneyDailyTodayMonday;
    
    @Column(name = "closing_tuesday")
    private BigDecimal closingTuesday;
    
    @Column(name = "expense_tuesday")
    private BigDecimal expenseTuesday;
    
    @Column(name = "money_daily_today_tuesday")
    private BigDecimal moneyDailyTodayTuesday;
    
    @Column(name = "closing_wednesday")
    private BigDecimal closingWednesday;
    
    @Column(name = "expense_wednesday")
    private BigDecimal expenseWednesday;
    
    @Column(name = "money_daily_today_wednesday")
    private BigDecimal moneyDailyTodayWednesday;
    
    @Column(name = "closing_thursday")
    private BigDecimal closingThursday;
    
    @Column(name = "expense_thursday")
    private BigDecimal expenseThursday;
    
    @Column(name = "money_daily_today_thursday")
    private BigDecimal moneyDailyTodayThursday;

    @Column(name = "closing_friday")
    private BigDecimal closingFriday;
    
    @Column(name = "expense_friday")
    private BigDecimal expenseFriday;
    
    @Column(name = "money_daily_today_friday")
    private BigDecimal moneyDailyTodayFriday;
    
    @Column(name = "closing_saturday")
    private BigDecimal closingSaturday;
    
    @Column(name = "expense_saturday")
    private BigDecimal expenseSaturday;
    
    @Column(name = "money_daily_today_saturday")
    private BigDecimal moneyDailyTodaySaturday;

    public String getId() {
        return id;
    }

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

    public String getUserName() {
        return userName;
    }

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

    public Office getOffice() {
        return office;
    }

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

    public BigDecimal getClosingMonday() {
        return closingMonday;
    }

    public void setClosingMonday(BigDecimal closingMonday) {
        this.closingMonday = closingMonday;
    }

    public BigDecimal getExpenseMonday() {
        return expenseMonday;
    }

    public void setExpenseMonday(BigDecimal expenseMonday) {
        this.expenseMonday = expenseMonday;
    }

    public BigDecimal getMoneyDailyTodayMonday() {
        return moneyDailyTodayMonday;
    }

    public void setMoneyDailyTodayMonday(BigDecimal moneyDailyTodayMonday) {
        this.moneyDailyTodayMonday = moneyDailyTodayMonday;
    }

    public BigDecimal getClosingTuesday() {
        return closingTuesday;
    }

    public void setClosingTuesday(BigDecimal closingTuesday) {
        this.closingTuesday = closingTuesday;
    }

    public BigDecimal getExpenseTuesday() {
        return expenseTuesday;
    }

    public void setExpenseTuesday(BigDecimal expenseTuesday) {
        this.expenseTuesday = expenseTuesday;
    }

    public BigDecimal getMoneyDailyTodayTuesday() {
        return moneyDailyTodayTuesday;
    }

    public void setMoneyDailyTodayTuesday(BigDecimal moneyDailyTodayTuesday) {
        this.moneyDailyTodayTuesday = moneyDailyTodayTuesday;
    }

    public BigDecimal getClosingWednesday() {
        return closingWednesday;
    }

    public void setClosingWednesday(BigDecimal closingWednesday) {
        this.closingWednesday = closingWednesday;
    }

    public BigDecimal getExpenseWednesday() {
        return expenseWednesday;
    }

    public void setExpenseWednesday(BigDecimal expenseWednesday) {
        this.expenseWednesday = expenseWednesday;
    }

    public BigDecimal getMoneyDailyTodayWednesday() {
        return moneyDailyTodayWednesday;
    }

    public void setMoneyDailyTodayWednesday(BigDecimal moneyDailyTodayWednesday) {
        this.moneyDailyTodayWednesday = moneyDailyTodayWednesday;
    }

    public BigDecimal getClosingThursday() {
        return closingThursday;
    }

    public void setClosingThursday(BigDecimal closingThursday) {
        this.closingThursday = closingThursday;
    }

    public BigDecimal getExpenseThursday() {
        return expenseThursday;
    }

    public void setExpenseThursday(BigDecimal expenseThursday) {
        this.expenseThursday = expenseThursday;
    }

    public BigDecimal getMoneyDailyTodayThursday() {
        return moneyDailyTodayThursday;
    }

    public void setMoneyDailyTodayThursday(BigDecimal moneyDailyTodayThursday) {
        this.moneyDailyTodayThursday = moneyDailyTodayThursday;
    }

    public BigDecimal getClosingFriday() {
        return closingFriday;
    }

    public void setClosingFriday(BigDecimal closingFriday) {
        this.closingFriday = closingFriday;
    }

    public BigDecimal getExpenseFriday() {
        return expenseFriday;
    }

    public void setExpenseFriday(BigDecimal expenseFriday) {
        this.expenseFriday = expenseFriday;
    }

    public BigDecimal getMoneyDailyTodayFriday() {
        return moneyDailyTodayFriday;
    }

    public void setMoneyDailyTodayFriday(BigDecimal moneyDailyTodayFriday) {
        this.moneyDailyTodayFriday = moneyDailyTodayFriday;
    }

    public BigDecimal getClosingSaturday() {
        return closingSaturday;
    }

    public void setClosingSaturday(BigDecimal closingSaturday) {
        this.closingSaturday = closingSaturday;
    }

    public BigDecimal getExpenseSaturday() {
        return expenseSaturday;
    }

    public void setExpenseSaturday(BigDecimal expenseSaturday) {
        this.expenseSaturday = expenseSaturday;
    }

    public BigDecimal getMoneyDailyTodaySaturday() {
        return moneyDailyTodaySaturday;
    }

    public void setMoneyDailyTodaySaturday(BigDecimal moneyDailyTodaySaturday) {
        this.moneyDailyTodaySaturday = moneyDailyTodaySaturday;
    }
    
    public BigDecimal getTotalInicios() {
        return moneyDailyTodayMonday.add(moneyDailyTodayThursday).add(moneyDailyTodayWednesday).
                add(moneyDailyTodayTuesday).add(moneyDailyTodayFriday).add(moneyDailyTodaySaturday);
    }
    
    public BigDecimal getTotalGastos() {
        return expenseMonday.add(expenseThursday).add(expenseWednesday).
                add(expenseTuesday).add(expenseFriday).add(expenseSaturday);
    }
    
    public BigDecimal getTotalCortes() {
        return closingMonday.add(closingThursday).add(closingWednesday).
                add(closingTuesday).add(closingFriday).add(closingSaturday);
    }
    
}
