Cleared lots of queries. In some cases, from 1400 back to 300. And those 300 have a different cause which is next.

This commit is contained in:
James Cole
2015-12-31 17:46:34 +01:00
parent a6594358d8
commit 3dcdacc3b8
4 changed files with 159 additions and 44 deletions

View File

@@ -32,6 +32,22 @@ interface BudgetRepositoryInterface
*/
public function getExpensesPerDay(Budget $budget, Carbon $start, Carbon $end);
/**
* @param Budget $budget
*
* @return Carbon
*/
public function firstActivity(Budget $budget);
/**
* Get a collection of all the limit repetitions belonging to this $budget.
*
* @param Budget $budget
*
* @return Collection
*/
public function getBudgetReps(Budget $budget);
/**
* Returns the expenses for this budget grouped per month, with the date
* in "date" (a string, not a Carbon) and the amount in "dailyAmount".
@@ -44,6 +60,22 @@ interface BudgetRepositoryInterface
*/
public function getExpensesPerMonth(Budget $budget, Carbon $start, Carbon $end);
/**
* Returns an array with the following key:value pairs:
*
* yyyy-mm-dd:<amount>
*
* Where yyyy-mm-dd is the date and <amount> is the money spent using WITHDRAWALS in the $budget
* from all the users accounts.
*
* @param Budget $budget
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end);
/**
* @param Budget $budget
*