line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MojoMojo::Schema::Result::Role; |
2
|
|
|
|
|
|
|
|
3
|
40
|
|
|
40
|
|
67903
|
use strict; |
|
40
|
|
|
|
|
105
|
|
|
40
|
|
|
|
|
1128
|
|
4
|
40
|
|
|
40
|
|
212
|
use warnings; |
|
40
|
|
|
|
|
85
|
|
|
40
|
|
|
|
|
1097
|
|
5
|
|
|
|
|
|
|
|
6
|
40
|
|
|
40
|
|
201
|
use parent qw/MojoMojo::Schema::Base::Result/; |
|
40
|
|
|
|
|
157
|
|
|
40
|
|
|
|
|
239
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->load_components( "Core" ); |
9
|
|
|
|
|
|
|
__PACKAGE__->table("role"); |
10
|
|
|
|
|
|
|
__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
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key("id"); |
19
|
|
|
|
|
|
|
__PACKAGE__->add_unique_constraint( "name_unique", ["name"] ); |
20
|
|
|
|
|
|
|
__PACKAGE__->has_many( "role_privileges", "MojoMojo::Schema::Result::RolePrivilege", { "foreign.role" => "self.id" }, ); |
21
|
|
|
|
|
|
|
__PACKAGE__->has_many( "role_members", "MojoMojo::Schema::Result::RoleMember", { "foreign.role" => "self.id" } ); |
22
|
|
|
|
|
|
|
__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
|
|
|
|
|
|
|
1; |