2016-06-26 17:49:12 +02:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
package TrsrDB::Account;
|
|
|
|
use base qw/DBIx::Class::Core/;
|
|
|
|
|
|
|
|
__PACKAGE__->table('Account');
|
|
|
|
__PACKAGE__->add_columns(qw/ID type altId IBAN/);
|
|
|
|
__PACKAGE__->set_primary_key('ID');
|
|
|
|
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
statement_rows => 'TrsrDB::ReconstructedBankStatement',
|
|
|
|
{ 'foreign.account' => 'self.ID' }
|
|
|
|
);
|
|
|
|
__PACKAGE__->has_many(
|
2016-07-03 22:05:53 +02:00
|
|
|
debits => 'TrsrDB::Debit',
|
2016-06-26 17:49:12 +02:00
|
|
|
{ 'foreign.debtor' => 'self.ID' }
|
|
|
|
);
|
|
|
|
__PACKAGE__->has_many(
|
2016-07-03 22:05:53 +02:00
|
|
|
current_arrears => 'TrsrDB::CurrentArrears',
|
2016-06-26 17:49:12 +02:00
|
|
|
{ 'foreign.debtor' => 'self.ID' }
|
|
|
|
);
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
credits => 'TrsrDB::Credit',
|
|
|
|
{ 'foreign.account' => 'self.ID' }
|
|
|
|
);
|
|
|
|
__PACKAGE__->has_many(
|
|
|
|
available_credits => 'TrsrDB::AvailableCredits',
|
|
|
|
{ 'foreign.account' => 'self.ID' }
|
|
|
|
);
|
|
|
|
__PACKAGE__->has_one(
|
|
|
|
balance => 'TrsrDB::Balance', 'ID'
|
|
|
|
);
|
2016-07-06 22:28:56 +02:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
history => 'TrsrDB::History',
|
|
|
|
{ 'foreign.account' => 'self.ID' }
|
|
|
|
);
|
2017-01-14 09:50:16 +01:00
|
|
|
__PACKAGE__->has_many(
|
|
|
|
report => 'TrsrDB::Report',
|
|
|
|
{ 'foreign.account' => 'self.ID' }
|
|
|
|
);
|
2016-06-26 17:49:12 +02:00
|
|
|
|
|
|
|
1;
|