treasuredb/TrsrDB/Category.pm
Florian "flowdy" Heß bb05b06cf3 Test suite starts covering HTTP interface.
+ Added some files missing in previous commits.
2017-02-06 08:10:05 +01:00

20 lines
381 B
Perl

use strict;
package TrsrDB::Category;
use base qw/DBIx::Class::Core/;
__PACKAGE__->table('category');
__PACKAGE__->add_columns(qw/ID label/);
__PACKAGE__->set_primary_key('ID');
__PACKAGE__->has_many(
debits => 'TrsrDB::Debit',
{ 'foreign.category' => 'self.ID' }
);
__PACKAGE__->has_many(
credits => 'TrsrDB::Credit',
{ 'foreign.category' => 'self.ID' }
);
1;