2015-02-09 07:23:39 +01:00
|
|
|
<?php
|
2016-05-20 12:41:23 +02:00
|
|
|
/**
|
|
|
|
* AccountRepositoryInterface.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
2016-10-05 06:52:15 +02:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-05-20 12:41:23 +02:00
|
|
|
*/
|
|
|
|
|
2016-02-05 12:08:25 +01:00
|
|
|
declare(strict_types = 1);
|
2015-02-09 07:23:39 +01:00
|
|
|
|
|
|
|
namespace FireflyIII\Repositories\Account;
|
|
|
|
|
2015-03-29 21:27:51 +02:00
|
|
|
use Carbon\Carbon;
|
2016-10-09 10:53:37 +02:00
|
|
|
use FireflyIII\Exceptions\FireflyException;
|
2015-02-14 14:25:29 +01:00
|
|
|
use FireflyIII\Models\Account;
|
2015-04-03 09:30:44 +02:00
|
|
|
use FireflyIII\Models\Transaction;
|
2015-03-29 21:27:51 +02:00
|
|
|
use FireflyIII\Models\TransactionJournal;
|
2015-03-13 08:44:07 +01:00
|
|
|
use Illuminate\Support\Collection;
|
2015-03-29 21:27:51 +02:00
|
|
|
|
2015-02-11 07:35:10 +01:00
|
|
|
/**
|
|
|
|
* Interface AccountRepositoryInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Repositories\Account
|
|
|
|
*/
|
2015-02-09 07:23:39 +01:00
|
|
|
interface AccountRepositoryInterface
|
|
|
|
{
|
2016-10-09 08:20:29 +02:00
|
|
|
|
2016-10-09 08:18:47 +02:00
|
|
|
/**
|
|
|
|
* Moved here from account CRUD.
|
|
|
|
*
|
|
|
|
* @param array $types
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function count(array $types): int;
|
2016-02-04 08:53:15 +01:00
|
|
|
|
2016-10-09 08:20:29 +02:00
|
|
|
/**
|
|
|
|
* Moved here from account CRUD.
|
|
|
|
*
|
|
|
|
* @param Account $account
|
|
|
|
* @param Account $moveTo
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function destroy(Account $account, Account $moveTo): bool;
|
|
|
|
|
2016-04-08 14:50:18 +02:00
|
|
|
/**
|
|
|
|
* Returns the date of the very first transaction in this account.
|
|
|
|
*
|
|
|
|
* @param Account $account
|
|
|
|
*
|
|
|
|
* @return Carbon
|
|
|
|
*/
|
|
|
|
public function oldestJournalDate(Account $account): Carbon;
|
|
|
|
|
2015-03-29 08:14:32 +02:00
|
|
|
}
|