2016-06-26 17:49:12 +02:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
package TrsrDB::AvailableCredits;
|
|
|
|
use base qw/DBIx::Class::Core/;
|
|
|
|
|
|
|
|
__PACKAGE__->table('AvailableCredits');
|
2016-07-03 22:05:53 +02:00
|
|
|
__PACKAGE__->add_columns(qw/ credId account date purpose difference /);
|
|
|
|
__PACKAGE__->set_primary_key("credId");
|
2016-06-26 17:49:12 +02:00
|
|
|
|
|
|
|
__PACKAGE__->belongs_to(
|
|
|
|
account => 'TrsrDB::Account',
|
|
|
|
{ 'foreign.ID' => 'self.account' }
|
|
|
|
);
|
|
|
|
|
|
|
|
__PACKAGE__->many_to_many(
|
2016-07-03 22:05:53 +02:00
|
|
|
suggested_to_pay => account => 'current_arrears'
|
2016-06-26 17:49:12 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
1;
|