mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-22 06:23:12 -06:00
78 lines
1.6 KiB
PHP
78 lines
1.6 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();
|
|
|
|
/**
|
|
* @param $what
|
|
* @param $data
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function store($what, $data);
|
|
|
|
/**
|
|
* @param \TransactionJournal $journal
|
|
* @param $data
|
|
*
|
|
* @return mixed
|
|
*/
|
|
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 int $count
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function paginate($count = 25);
|
|
|
|
} |