This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Foodloop-Server/lib/Pear/LocalLoop/Schema/ResultSet/Entity.pm
2021-03-20 15:02:00 +00:00

23 lines
378 B
Perl

package Pear::LocalLoop::Schema::ResultSet::Entity;
use strict;
use warnings;
use base 'DBIx::Class::ResultSet';
sub sales { return shift->search_related( 'sales', @_ ) }
sub create_org {
my ( $self, $org ) = @_;
return $self->create(
{
organisation => $org,
type => 'organisation',
}
);
return 1;
}
1;