2015-05-17 10:54:13 -05:00
|
|
|
<?php
|
2016-02-05 05:08:25 -06:00
|
|
|
declare(strict_types = 1);
|
2015-05-17 10:54:13 -05:00
|
|
|
namespace FireflyIII\Helpers\Collection;
|
|
|
|
|
|
|
|
use FireflyIII\Models\Bill as BillModel;
|
|
|
|
|
|
|
|
/**
|
2015-05-21 00:30:38 -05:00
|
|
|
* @codeCoverageIgnore
|
|
|
|
*
|
2015-05-17 10:54:13 -05:00
|
|
|
* Class BillLine
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers\Collection
|
|
|
|
*/
|
|
|
|
class BillLine
|
|
|
|
{
|
|
|
|
|
|
|
|
/** @var bool */
|
|
|
|
protected $active;
|
2015-06-14 01:22:02 -05:00
|
|
|
/** @var string */
|
2015-05-17 10:54:13 -05:00
|
|
|
protected $amount;
|
|
|
|
/** @var BillModel */
|
|
|
|
protected $bill;
|
|
|
|
/** @var bool */
|
|
|
|
protected $hit;
|
2015-06-14 01:22:02 -05:00
|
|
|
/** @var string */
|
2015-05-17 10:54:13 -05:00
|
|
|
protected $max;
|
2015-06-14 01:22:02 -05:00
|
|
|
/** @var string */
|
2015-05-17 10:54:13 -05:00
|
|
|
protected $min;
|
|
|
|
|
2016-02-06 13:17:55 -06:00
|
|
|
/** @var int */
|
|
|
|
private $transactionJournalId;
|
|
|
|
|
2015-05-17 10:54:13 -05:00
|
|
|
/**
|
2015-06-14 01:22:02 -05:00
|
|
|
* @return string
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getAmount(): string
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
return $this->amount;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-06-14 01:22:02 -05:00
|
|
|
* @param string $amount
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setAmount(string $amount)
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
$this->amount = $amount;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return BillModel
|
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getBill(): BillModel
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
return $this->bill;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param BillModel $bill
|
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setBill(BillModel $bill)
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
$this->bill = $bill;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-06-14 01:22:02 -05:00
|
|
|
* @return string
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getMax(): string
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
return $this->max;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-06-14 01:22:02 -05:00
|
|
|
* @param string $max
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setMax(string $max)
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
$this->max = $max;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-06-14 01:22:02 -05:00
|
|
|
* @return string
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function getMin(): string
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
return $this->min;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-06-14 01:22:02 -05:00
|
|
|
* @param string $min
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setMin(string $min)
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
$this->min = $min;
|
|
|
|
}
|
|
|
|
|
2016-02-06 13:17:55 -06:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getTransactionJournalId(): int
|
|
|
|
{
|
|
|
|
return $this->transactionJournalId ?? 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int $transactionJournalId
|
|
|
|
*/
|
|
|
|
public function setTransactionJournalId(int $transactionJournalId)
|
|
|
|
{
|
|
|
|
$this->transactionJournalId = $transactionJournalId;
|
|
|
|
}
|
|
|
|
|
2015-05-17 10:54:13 -05:00
|
|
|
/**
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function isActive(): bool
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
return $this->active;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @param bool $active
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setActive(bool $active)
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
$this->active = $active;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2016-02-18 03:04:26 -06:00
|
|
|
public function isHit(): bool
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
return $this->hit;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @param bool $hit
|
2015-05-17 10:54:13 -05:00
|
|
|
*/
|
2016-02-05 02:25:15 -06:00
|
|
|
public function setHit(bool $hit)
|
2015-05-17 10:54:13 -05:00
|
|
|
{
|
|
|
|
$this->hit = $hit;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-20 12:56:14 -05:00
|
|
|
}
|