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

24 lines
421 B
Perl
Raw Normal View History

package Pear::LocalLoop::Schema::ResultSet::Entity;
use strict;
use warnings;
use base 'DBIx::Class::ResultSet';
2021-03-20 19:53:38 +00:00
## no critic (Subroutines::RequireArgUnpacking)
2021-03-20 15:02:00 +00:00
sub sales { return shift->search_related( 'sales', @_ ) }
2021-03-20 19:53:38 +00:00
## use critic
2017-08-31 16:53:54 +00:00
sub create_org {
2021-03-20 12:09:50 +00:00
my ( $self, $org ) = @_;
2017-08-31 16:53:54 +00:00
2021-03-20 12:09:50 +00:00
return $self->create(
{
organisation => $org,
type => 'organisation',
}
);
2017-08-31 16:53:54 +00:00
}
1;