20 lines
		
	
	
		
			422 B
		
	
	
	
		
			Perl
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			422 B
		
	
	
	
		
			Perl
		
	
	
	
	
	
use strict;
 | 
						|
 | 
						|
package TrsrDB::CurrentDebts;
 | 
						|
use base qw/DBIx::Class::Core/;
 | 
						|
 | 
						|
__PACKAGE__->table('CurrentDebts');
 | 
						|
__PACKAGE__->add_columns(qw/billId debtor targetCredit date purpose difference/);
 | 
						|
__PACKAGE__->set_primary_key("billId");
 | 
						|
 | 
						|
__PACKAGE__->belongs_to(
 | 
						|
    account => 'TrsrDB::Account',
 | 
						|
    { 'foreign.ID' => 'self.account' }
 | 
						|
);
 | 
						|
 | 
						|
__PACKAGE__->many_to_many(
 | 
						|
    payable_with => account => 'available_credits'
 | 
						|
);
 | 
						|
 | 
						|
1;
 |