2015-02-09 00:23:39 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Repositories\Account;
|
|
|
|
|
2015-02-14 07:25:29 -06:00
|
|
|
use FireflyIII\Models\Account;
|
|
|
|
use FireflyIII\Models\TransactionJournal;
|
2015-03-13 02:44:07 -05:00
|
|
|
use FireflyIII\Models\Preference;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Carbon\Carbon;
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
|
|
|
* Interface AccountRepositoryInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Repositories\Account
|
|
|
|
*/
|
2015-02-09 00:23:39 -06:00
|
|
|
interface AccountRepositoryInterface
|
|
|
|
{
|
2015-02-14 07:25:29 -06:00
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public function destroy(Account $account);
|
|
|
|
|
2015-03-13 02:44:07 -05:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function countAssetAccounts();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Preference $preference
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function getFrontpageAccounts(Preference $preference);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
* @param Carbon $start
|
|
|
|
* @param Carbon $end
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getFrontpageTransactions(Account $account, Carbon $start, Carbon $end);
|
|
|
|
|
2015-02-14 07:25:29 -06:00
|
|
|
/**
|
|
|
|
* @param Account $account
|
2015-02-21 05:16:41 -06:00
|
|
|
* @param string $range
|
2015-02-14 07:25:29 -06:00
|
|
|
*
|
2015-02-21 05:16:41 -06:00
|
|
|
* @return mixed
|
2015-02-14 07:25:29 -06:00
|
|
|
*/
|
2015-03-02 13:05:28 -06:00
|
|
|
public function getJournals(Account $account, $page);
|
2015-02-14 07:25:29 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
*
|
|
|
|
* @return TransactionJournal|null
|
|
|
|
*/
|
|
|
|
public function openingBalanceTransaction(Account $account);
|
|
|
|
|
2015-02-21 05:16:41 -06:00
|
|
|
/**
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return Account
|
|
|
|
*/
|
|
|
|
public function store(array $data);
|
2015-02-14 07:25:29 -06:00
|
|
|
|
2015-02-21 05:16:41 -06:00
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return Account
|
|
|
|
*/
|
|
|
|
public function update(Account $account, array $data);
|
2015-02-24 14:10:25 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Account $account
|
|
|
|
*
|
|
|
|
* @return float
|
|
|
|
*/
|
|
|
|
public function leftOnAccount(Account $account);
|
2015-03-21 02:51:34 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get savings accounts and the balance difference in the period.
|
|
|
|
*
|
|
|
|
* @return Collection
|
|
|
|
*/
|
|
|
|
public function getSavingsAccounts();
|
2015-03-29 01:14:32 -05:00
|
|
|
}
|