feature/RVRNEXT-43-split-transactions #59
@ -17,6 +17,10 @@ class Transaction extends Model
|
|||||||
'payee_user' => User::class
|
'payee_user' => User::class
|
||||||
];
|
];
|
||||||
|
|
||||||
|
protected static array $multiRelations = [
|
||||||
|
'payees' => [TransactionPayee::class, 'transaction']
|
||||||
|
];
|
||||||
|
|
||||||
private ?Community $community = null;
|
private ?Community $community = null;
|
||||||
|
|
||||||
private int $communityId;
|
private int $communityId;
|
||||||
@ -37,6 +41,8 @@ class Transaction extends Model
|
|||||||
|
|
||||||
private ?int $payeeUserId = null;
|
private ?int $payeeUserId = null;
|
||||||
|
|
||||||
|
private ?array $payees = null;
|
||||||
|
|
||||||
private string $description = '';
|
private string $description = '';
|
||||||
|
|
||||||
private float $sum = 0.0;
|
private float $sum = 0.0;
|
||||||
@ -93,6 +99,11 @@ class Transaction extends Model
|
|||||||
$this->payeeUserId = $payeeUserId;
|
$this->payeeUserId = $payeeUserId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setPayees(array $payees): void
|
||||||
|
{
|
||||||
|
$this->payees = $payees;
|
||||||
|
}
|
||||||
|
|
||||||
public function setDescription(string $description): void
|
public function setDescription(string $description): void
|
||||||
{
|
{
|
||||||
$this->description = $description;
|
$this->description = $description;
|
||||||
@ -163,6 +174,11 @@ class Transaction extends Model
|
|||||||
return $this->payeeUserId;
|
return $this->payeeUserId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPayees(): ?array
|
||||||
|
{
|
||||||
|
return $this->payees;
|
||||||
|
}
|
||||||
|
|
||||||
public function getDescription(): string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
return $this->description;
|
return $this->description;
|
||||||
|
Loading…
Reference in New Issue
Block a user