lib/MojoMojo/Schema/Result/Role.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/MojoMojo/Schema/Result/Preference.pm ↑ Summary lib/MojoMojo/Schema/Result/RoleMember.pm »
1 package MojoMojo::Schema::Result::Role;
2  
3 40 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 40 ▶use parent qw/MojoMojo::Schema::Base::Result/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 40 __PACKAGE__->load_components( "Core" );
9 40 __PACKAGE__->table("role");
10 40 __PACKAGE__->add_columns(
11 "id",
12 { data_type => "INTEGER", is_nullable => 0, size => undef, is_auto_increment => 1 },
13 "name",
14 { data_type => "VARCHAR", is_nullable => 0, size => 200 },
15 "active",
16 { data_type => "INTEGER", is_nullable => 0, size => undef, default => 1 },
17 );
18 40 __PACKAGE__->set_primary_key("id");
19 40 __PACKAGE__->add_unique_constraint( "name_unique", ["name"] );
20 40 __PACKAGE__->has_many( "role_privileges", "MojoMojo::Schema::Result::RolePrivilege", { "foreign.role" => "self.id" }, );
21 40 __PACKAGE__->has_many( "role_members", "MojoMojo::Schema::Result::RoleMember", { "foreign.role" => "self.id" } );
22 40 __PACKAGE__->many_to_many( "members", "role_members", "person" );
23  
24 =head1 NAME
25  
26 MojoMojo::Schema::Result::Role - store user roles
27  
28 =head1 AUTHOR
29  
30 Marcus Ramberg <mramberg@cpan.org>
31  
32 =head1 LICENSE
33  
34 This library is free software. You can redistribute it and/or modify
35 it under the same terms as Perl itself.
36  
37 =cut
38  
39  
40 40 1;
« lib/MojoMojo/Schema/Result/Preference.pm ↑ Summary lib/MojoMojo/Schema/Result/RoleMember.pm »