treasuredb/TrsrDB/Transfer.pm
Florian "flowdy" Heß 3773c3f123 Various changes and fixes: Added report, etc. Tests pass.
* reworked and used TrsrDB::expand_ids more tightly
  * account item selection in TrsrDB::make_transfers
  * web_auth / User relation for coming HTTP interface
  * income and target inter-relations between TrsrDB::Credit and TrsrDB::Debit
  * Transfer note
  * reactivated enforceFixedCredit to take effect unless _temp table is empty
  * added CreditsInFocus and Report views
2017-01-14 09:50:16 +01:00

23 lines
599 B
Perl

use strict;
package TrsrDB::Transfer;
use base qw/DBIx::Class::Core/;
__PACKAGE__->table('Transfer');
__PACKAGE__->add_column("timestamp" => { data_type => 'TIMESTAMP' });
__PACKAGE__->add_column("billId");
__PACKAGE__->add_column("credId" => { data_type => 'INTEGER' });
__PACKAGE__->add_column("amount" => { data_type => 'INTEGER', nullable => 1 });
__PACKAGE__->add_column("note" => { nullable => 1 });
__PACKAGE__->set_primary_key("billId", "credId");
__PACKAGE__->belongs_to(
credit => 'TrsrDB::Credit', 'credId'
);
__PACKAGE__->belongs_to(
debit => 'TrsrDB::Credit', 'billId'
);
1;