/*
 * 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.taxiservicios.model.mutual;

import com.arrebol.taxiservicios.model.admin.*;
import com.arrebol.taxiservicios.model.catalog.Location;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.BasicType;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

/**
 *
 * @author Carlos Janitzio Zavala Lopez <janitzio.zavala@arrebol.com.mx>
 */
public class MutualStableGeneralBox implements Serializable {

    private String id;
    private BigDecimal totalGeneralBox;
    private BigDecimal totalEnvelope;
    private BigDecimal totalBankNote;
    private BigDecimal totalBank;
    private BigDecimal totalCoin;
    private BigDecimal totalStable;
    private BasicType activeStatus;
    private String description;
    private User createdBy;
    private Date createdOn;
    private User lastUpdatedBy;
    private Date lastUpdatedOn;
    private Location location;

    /**
     * Default constructor.
     */
    public MutualStableGeneralBox() {
    }

    /**
     *
     * @param id
     * @param totalGeneralBox
     * @param totalEnvelope
     * @param totalBankNote
     * @param totalCoin
     * @param totalStable
     * @param activeStatus
     * @param description
     * @param createdBy
     * @param createdOn
     */
    public MutualStableGeneralBox(String id, BigDecimal totalGeneralBox, BigDecimal totalEnvelope, BigDecimal totalBankNote, BigDecimal totalCoin, BigDecimal totalStable, BasicType activeStatus, String description, User createdBy, Date createdOn) {
        this.id = id;
        this.totalGeneralBox = totalGeneralBox;
        this.totalEnvelope = totalEnvelope;
        this.totalBankNote = totalBankNote;
        this.totalCoin = totalCoin;
        this.totalStable = totalStable;
        this.activeStatus = activeStatus;
        this.description = description;
        this.createdBy = createdBy;
        this.createdOn = createdOn;
    }

    /**
     *
     * @param id
     * @param totalGeneralBox
     * @param totalEnvelope
     * @param totalBankNote
     * @param totalCoin
     * @param totalStable
     * @param description
     * @param createdOn
     */
    public MutualStableGeneralBox(String id, BigDecimal totalGeneralBox, BigDecimal totalEnvelope, BigDecimal totalBankNote, BigDecimal totalCoin, BigDecimal totalStable, String description, Date createdOn) {
        this.id = id;
        this.totalGeneralBox = totalGeneralBox;
        this.totalEnvelope = totalEnvelope;
        this.totalBankNote = totalBankNote;
        this.totalCoin = totalCoin;
        this.totalStable = totalStable;
        this.description = description;
        this.createdOn = createdOn;
    }

    /**
     *
     * @param id
     * @param totalGeneralBox
     * @param totalEnvelope
     * @param totalBankNote
     * @param totalCoin
     * @param totalStable
     * @param description
     * @param createdOn
     * @param createdBy
     */
    public MutualStableGeneralBox(String id, BigDecimal totalGeneralBox, BigDecimal totalEnvelope, BigDecimal totalBankNote, BigDecimal totalCoin, BigDecimal totalStable, String description, Date createdOn, User createdBy) {
        this.id = id;
        this.totalGeneralBox = totalGeneralBox;
        this.totalEnvelope = totalEnvelope;
        this.totalBankNote = totalBankNote;
        this.totalCoin = totalCoin;
        this.totalStable = totalStable;
        this.description = description;
        this.createdOn = createdOn;
        this.createdBy = createdBy;
    }
    
    public MutualStableGeneralBox(String id, BigDecimal totalGeneralBox, BigDecimal totalEnvelope, BigDecimal totalBankNote, BigDecimal totalCoin, BigDecimal totalStable, String description, Date createdOn, User createdBy, Location location, BasicType activeStatus) {
        this.id = id;
        this.totalGeneralBox = totalGeneralBox;
        this.totalEnvelope = totalEnvelope;
        this.totalBankNote = totalBankNote;
        this.totalCoin = totalCoin;
        this.totalStable = totalStable;
        this.description = description;
        this.createdOn = createdOn;
        this.createdBy = createdBy;
        this.location = location;
        this.activeStatus = activeStatus;
    }
    
    public MutualStableGeneralBox(String id, BigDecimal totalGeneralBox, BigDecimal totalEnvelope, BigDecimal totalBankNote, BigDecimal totalCoin, BigDecimal totalStable, String description, Date createdOn, User createdBy, Location location, BasicType activeStatus, BigDecimal totalBank) {
        this.id = id;
        this.totalGeneralBox = totalGeneralBox;
        this.totalEnvelope = totalEnvelope;
        this.totalBankNote = totalBankNote;
        this.totalCoin = totalCoin;
        this.totalStable = totalStable;
        this.description = description;
        this.createdOn = createdOn;
        this.createdBy = createdBy;
        this.location = location;
        this.activeStatus = activeStatus;
        this.totalBank = totalBank;
    }

    /**
     *
     * @param id
     * @param totalGeneralBox
     * @param totalEnvelope
     * @param totalBankNote
     * @param totalCoin
     * @param createdOn
     */
    public MutualStableGeneralBox(String id, BigDecimal totalGeneralBox, BigDecimal totalEnvelope, BigDecimal totalBankNote, BigDecimal totalCoin, Date createdOn) {
        this.id = id;
        this.totalGeneralBox = totalGeneralBox;
        this.totalEnvelope = totalEnvelope;
        this.totalBankNote = totalBankNote;
        this.totalCoin = totalCoin;
        this.createdOn = createdOn;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public String getId() {
        return id;
    }

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

    public BigDecimal getTotalGeneralBox() {
        if (null == totalGeneralBox) {
            totalGeneralBox = BigDecimal.ZERO;
        }
        return totalGeneralBox;
    }

    public void setTotalGeneralBox(BigDecimal totalGeneralBox) {
        this.totalGeneralBox = totalGeneralBox;
    }

    public BigDecimal getTotalEnvelope() {
        if (null == totalEnvelope) {
            totalEnvelope = BigDecimal.ZERO;
        }
        return totalEnvelope;
    }

    public void setTotalEnvelope(BigDecimal totalEnvelope) {
        this.totalEnvelope = totalEnvelope;
    }

    public BigDecimal getTotalBankNote() {
        if (null == totalBankNote) {
            totalBankNote = BigDecimal.ZERO;
        }
        return totalBankNote;
    }

    public void setTotalBankNote(BigDecimal totalBankNote) {
        this.totalBankNote = totalBankNote;
    }

    public BigDecimal getTotalCoin() {
        if (null == totalCoin) {
            totalCoin = BigDecimal.ZERO;
        }
        return totalCoin;
    }

    public void setTotalCoin(BigDecimal totalCoin) {
        this.totalCoin = totalCoin;
    }

    public BigDecimal getTotalStable() {
        if (null == totalStable) {
            totalStable = BigDecimal.ZERO;
        }
        return totalStable;
    }

    public void setTotalStable(BigDecimal totalStable) {
        this.totalStable = totalStable;
    }

    public BasicType getActiveStatus() {
        return activeStatus;
    }

    public void setActiveStatus(BasicType activeStatus) {
        this.activeStatus = activeStatus;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public User getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

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

    public User getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(User lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getLastUpdatedOn() {
        return lastUpdatedOn;
    }

    public void setLastUpdatedOn(Date lastUpdatedOn) {
        this.lastUpdatedOn = lastUpdatedOn;
    }

    @Override
    public String toString() {
        return "StableGeneralBox{" + "activeStatus=" + activeStatus + ", description=" + description + ", createdOn=" + createdOn + '}';
    }

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

    public BigDecimal getTotalBank() {
        return totalBank;
    }

    public void setTotalBank(BigDecimal totalBank) {
        this.totalBank = totalBank;
    }
    
    public boolean getActive(){
        if(activeStatus == BasicType.ENEBLED)
            return true;
        else
            return false;
                  
    }

    private static final long serialVersionUID = -1755137009083246238L;

}
