Schema/Result/Role.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 17 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Schema/Result/ProductMessage.pm ↑ Summary Schema/Result/Session.pm »
1 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Interchange6::Schema::Result::Role;
4  
5 =head1 NAME
6  
7 Interchange6::Schema::Result::Role
8  
9 =cut
10  
11 2 ▶use Interchange6::Schema::Candy;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 =head1 ACCESSORS
14  
15 =head2 roles_id
16  
17 Primary key.
18  
19 =cut
20  
21 2 primary_column roles_id => {
22 data_type => "integer",
23 is_auto_increment => 1,
24 sequence => "roles_roles_id_seq",
25 };
26  
27 =head2 name
28  
29 Role name, e.g.: admin.
30  
31 Unique constraint.
32  
33 =cut
34  
35 2 unique_column name => { data_type => "varchar", size => 32 };
36  
37 =head2 label
38  
39 Label, e.g.: Admin.
40  
41 =cut
42  
43 2 column label => { data_type => "varchar", size => 255 };
44  
45 =head2 description
46  
47 Description, e.g.: Administrator with full privileges.
48  
49 =cut
50  
51 2 column description => { data_type => "text" };
52  
53 =head1 RELATIONS
54  
55 =head2 price_modifiers
56  
57 Type: has_many
58  
59 Related object: L<Interchange6::Schema::Result::PriceModifier>
60  
61 =cut
62  
63 2 has_many
64 price_modifiers => "Interchange6::Schema::Result::PriceModifier",
65 "roles_id",
66 { cascade_copy => 0, cascade_delete => 0 };
67  
68 =head2 permissions
69  
70 Type: has_many
71  
72 Related object: L<Interchange6::Schema::Result::Permission>
73  
74 =cut
75  
76 2 has_many
77 permissions => "Interchange6::Schema::Result::Permission",
78 "roles_id",
79 { cascade_copy => 0, cascade_delete => 0 };
80  
81 =head2 user_roles
82  
83 Type: has_many
84  
85 Related object: L<Interchange6::Schema::Result::UserRole>
86  
87 =cut
88  
89 2 has_many
90 user_roles => "Interchange6::Schema::Result::UserRole",
91 "roles_id",
92 { cascade_copy => 0, cascade_delete => 0 };
93  
94 =head2 users
95  
96 Type: many_to_many
97  
98 Composing rels: L</user_roles> -> user
99  
100 =cut
101  
102 2 many_to_many users => "user_roles", "user";
103  
104 2 1;
« Schema/Result/ProductMessage.pm ↑ Summary Schema/Result/Session.pm »