treasuredb/TrsrDB/History.pm

25 lines
509 B
Perl
Raw Normal View History

2016-06-26 17:49:12 +02:00
use strict;
package TrsrDB::History;
use base qw/DBIx::Class::Core/;
__PACKAGE__->table('History');
2017-01-15 16:27:22 +01:00
__PACKAGE__->add_columns(qw/date purpose account credId credit debit contra billId note/);
2016-06-26 17:49:12 +02:00
__PACKAGE__->belongs_to(
account => 'TrsrDB::Account',
{ 'foreign.ID' => 'self.account' }
);
2017-01-15 16:27:22 +01:00
__PACKAGE__->belongs_to(
this_credit => 'TrsrDB::Credit',
{ 'foreign.credId' => 'self.credId' }
);
__PACKAGE__->belongs_to(
that_credit => 'TrsrDB::Credit',
{ 'foreign.credId' => 'self.contra' }
);
2016-06-26 17:49:12 +02:00
1;