mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 17:31:09 -06:00
90 lines
1.6 KiB
PHP
90 lines
1.6 KiB
PHP
<?php
|
|
declare(strict_types = 1);
|
|
|
|
namespace FireflyIII\Repositories\PiggyBank;
|
|
|
|
use FireflyIII\Models\PiggyBank;
|
|
use Illuminate\Support\Collection;
|
|
|
|
/**
|
|
* Interface PiggyBankRepositoryInterface
|
|
*
|
|
* @package FireflyIII\Repositories\PiggyBank
|
|
*/
|
|
interface PiggyBankRepositoryInterface
|
|
{
|
|
|
|
/**
|
|
* @param PiggyBank $piggyBank
|
|
* @param string $amount
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function createEvent(PiggyBank $piggyBank, string $amount);
|
|
|
|
/**
|
|
* @param PiggyBank $piggyBank
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function destroy(PiggyBank $piggyBank);
|
|
|
|
/**
|
|
* @param PiggyBank $piggyBank
|
|
*
|
|
* @return Collection
|
|
*/
|
|
public function getEventSummarySet(PiggyBank $piggyBank);
|
|
|
|
/**
|
|
* @param PiggyBank $piggyBank
|
|
*
|
|
* @return Collection
|
|
*/
|
|
public function getEvents(PiggyBank $piggyBank);
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getMaxOrder();
|
|
|
|
/**
|
|
* @return Collection
|
|
*/
|
|
public function getPiggyBanks();
|
|
|
|
/**
|
|
* Set all piggy banks to order 0.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function reset();
|
|
|
|
/**
|
|
*
|
|
* set id of piggy bank.
|
|
*
|
|
* @param int $piggyBankId
|
|
* @param int $order
|
|
*
|
|
* @return void
|
|
*/
|
|
public function setOrder(int $piggyBankId, int $order);
|
|
|
|
|
|
/**
|
|
* @param array $data
|
|
*
|
|
* @return PiggyBank
|
|
*/
|
|
public function store(array $data);
|
|
|
|
/**
|
|
* @param PiggyBank $piggyBank
|
|
* @param array $data
|
|
*
|
|
* @return PiggyBank
|
|
*/
|
|
public function update(PiggyBank $piggyBank, array $data);
|
|
}
|