2016-06-26 17:49:12 +02:00
|
|
|
use strict;
|
|
|
|
|
|
|
|
package TrsrDB::Transfer;
|
|
|
|
use base qw/DBIx::Class::Core/;
|
|
|
|
|
|
|
|
__PACKAGE__->table('Transfer');
|
|
|
|
__PACKAGE__->add_column("timestamp" => { data_type => 'TIMESTAMP' });
|
|
|
|
__PACKAGE__->add_column("billId");
|
2016-07-03 22:05:53 +02:00
|
|
|
__PACKAGE__->add_column("credId" => { data_type => 'INTEGER' });
|
2016-06-26 17:49:12 +02:00
|
|
|
__PACKAGE__->add_column("amount" => { data_type => 'INTEGER', nullable => 1 });
|
2017-01-14 09:50:16 +01:00
|
|
|
__PACKAGE__->add_column("note" => { nullable => 1 });
|
2016-07-03 22:05:53 +02:00
|
|
|
__PACKAGE__->set_primary_key("billId", "credId");
|
2016-06-26 17:49:12 +02:00
|
|
|
|
|
|
|
__PACKAGE__->belongs_to(
|
2016-07-03 22:05:53 +02:00
|
|
|
credit => 'TrsrDB::Credit', 'credId'
|
2016-06-26 17:49:12 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
__PACKAGE__->belongs_to(
|
|
|
|
debit => 'TrsrDB::Credit', 'billId'
|
|
|
|
);
|
|
|
|
|
|
|
|
1;
|