Payee
NAME
App::Moneymoor::Model::Payee - who you paid, or who paid you.
SYNOPSIS
use App::Moneymoor::Model::Payee;
my $p = App::Moneymoor::Model::Payee.new(name => 'Tesco');
my $loaded = App::Moneymoor::Model::Payee.new-from-row(%row);
DESCRIPTION
A payee is a name and nothing else. It carries no budgeting semantics ā the engine never looks at one ā and exists so transactions can be grouped and searched by counterparty, and so a future UI can offer autocomplete and remembered categories.
Names are unique; Gateway::Payee.find-or-create is the idiomatic
way to attach one to a transaction without racing on that uniqueness.
Deleting a payee nulls the reference on its transactions
(ON DELETE SET NULL) rather than deleting them: losing a payee
name is an annoyance, losing a transaction is a corrupted budget.
Transfers do not use payees. The other leg of a transfer is the
counterparty, and it is identified by transfer-peer-id on the
transaction.
ATTRIBUTES
idā primary key; absent on a not-yet-inserted row.nameā required, unique.
METHODS
new-from-row(%row)ā build from a DBIish row hash.