treasuredb/TrsrDB/Balance.pm
Florian "flowdy" Heß 8459e9ae48 Fixes and tests for indirect transfers. Extended balance.
TrsrDB:
    fixed Id -> credId
    autobalance -> make_transfers

TrsrDB::Account:
    added history accessor
TrsrDB::Balance:
    added fieds earned spent and even_until, renamed credit to available
TrsrDB::CurrentArrears:
    fixed account -> debtor in relation declaration
schema.sql:
    fixed triggers
    deactivated trigger enforceFixedCredit
    extended Balance with some more fields
t/schema.{sql,out}
    trivial fixes
t/schema.t added tests:
    Get balances after transfers
    partial use of credit,
    indirect transfers
2016-07-06 22:53:31 +02:00

15 lines
297 B
Perl

use strict;
package TrsrDB::Balance;
use base qw/DBIx::Class::Core/;
__PACKAGE__->table("Balance");
__PACKAGE__->add_columns(qw/ ID available earned promised spent arrears even_until /);
__PACKAGE__->set_primary_key("ID");
__PACKAGE__->belongs_to(
account => 'TrsrDB::Account', 'ID'
);
1;