mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
74 lines
1.5 KiB
PHP
74 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Firefly\Storage\TransactionJournal;
|
|
|
|
use Carbon\Carbon;
|
|
|
|
/**
|
|
* Interface TransactionJournalRepositoryInterface
|
|
*
|
|
* @package Firefly\Storage\TransactionJournal
|
|
*/
|
|
interface TransactionJournalRepositoryInterface
|
|
{
|
|
/**
|
|
* @param \Account $from
|
|
* @param \Account $toAccount
|
|
* @param $description
|
|
* @param $amount
|
|
* @param Carbon $date
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function createSimpleJournal(\Account $from, \Account $toAccount, $description, $amount, Carbon $date);
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get();
|
|
|
|
public function store($what, $data);
|
|
|
|
public function update(\TransactionJournal $journal, $data);
|
|
|
|
/**
|
|
* @param $journalId
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function find($journalId);
|
|
|
|
/**
|
|
* @param \Account $account
|
|
* @param int $count
|
|
* @param Carbon $start
|
|
* @param Carbon $end
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getByAccountInDateRange(\Account $account, $count = 25, Carbon $start, Carbon $end);
|
|
|
|
/**
|
|
* @param \Account $account
|
|
* @param Carbon $date
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getByAccountAndDate(\Account $account, Carbon $date);
|
|
|
|
/**
|
|
* @param Carbon $start
|
|
* @param Carbon $end
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getByDateRange(Carbon $start, Carbon $end);
|
|
|
|
/**
|
|
* @param int $count
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function paginate($count = 25);
|
|
|
|
} |