2016-06-26 17:49:12 +02:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
package TrsrDB::History;
|
|
|
|
use base qw/DBIx::Class::Core/;
|
|
|
|
|
|
|
|
__PACKAGE__->table('History');
|
2017-01-29 15:57:34 +01:00
|
|
|
__PACKAGE__->add_columns(qw/date purpose category 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;
|