2015-05-16 07:51:23 -05:00
|
|
|
<?php
|
2016-02-05 05:08:25 -06:00
|
|
|
declare(strict_types = 1);
|
2015-05-16 07:51:23 -05:00
|
|
|
namespace FireflyIII\Helpers\Collection;
|
|
|
|
|
|
|
|
use FireflyIII\Models\Account as AccountModel;
|
|
|
|
|
|
|
|
/**
|
2015-05-16 12:08:54 -05:00
|
|
|
*
|
2015-05-16 07:51:23 -05:00
|
|
|
* Class BalanceEntry
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Collection
|
|
|
|
*/
|
|
|
|
class BalanceEntry
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/** @var AccountModel */
|
|
|
|
protected $account;
|
2016-02-05 02:25:15 -06:00
|
|
|
/** @var string */
|
|
|
|
protected $left = '0';
|
|
|
|
/** @var string */
|
|
|
|
protected $spent = '0';
|
2015-05-16 07:51:23 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return AccountModel
|
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getAccount(): AccountModel
|
2015-05-16 07:51:23 -05:00
|
|
|
{
|
|
|
|
return $this->account;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param AccountModel $account
|
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setAccount(AccountModel $account)
|
2015-05-16 07:51:23 -05:00
|
|
|
{
|
|
|
|
$this->account = $account;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @return string
|
2015-05-16 07:51:23 -05:00
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getLeft(): string
|
2015-05-16 07:51:23 -05:00
|
|
|
{
|
2015-05-20 12:55:53 -05:00
|
|
|
return $this->left;
|
2015-05-16 07:51:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @param string $left
|
2015-05-16 07:51:23 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setLeft(string $left)
|
2015-05-16 07:51:23 -05:00
|
|
|
{
|
2015-05-20 12:55:53 -05:00
|
|
|
$this->left = $left;
|
2015-05-16 07:51:23 -05:00
|
|
|
}
|
|
|
|
|
2015-05-17 05:49:09 -05:00
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @return string
|
2015-05-17 05:49:09 -05:00
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getSpent(): string
|
2015-05-17 05:49:09 -05:00
|
|
|
{
|
2015-05-20 12:55:53 -05:00
|
|
|
return $this->spent;
|
2015-05-17 05:49:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @param string $spent
|
2015-05-17 05:49:09 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setSpent(string $spent)
|
2015-05-17 05:49:09 -05:00
|
|
|
{
|
2015-05-20 12:55:53 -05:00
|
|
|
$this->spent = $spent;
|
2015-05-17 05:49:09 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-20 12:56:14 -05:00
|
|
|
}
|