line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AproJo::DB::Schema::Result::Role; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1397
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
71
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
59
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use base 'DBIx::Class::Core'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
402
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->table('roles'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
11
|
|
|
|
|
|
|
'role_id', |
12
|
|
|
|
|
|
|
{data_type => 'integer', is_auto_increment => 1, is_nullable => 0}, |
13
|
|
|
|
|
|
|
'name', |
14
|
|
|
|
|
|
|
{data_type => 'varchar', is_nullable => 0, size => 160}, |
15
|
|
|
|
|
|
|
'trash', |
16
|
|
|
|
|
|
|
{data_type => 'tinyint', default_value => 0, is_nullable => 0}, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key('role_id'); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
__PACKAGE__->has_many( |
22
|
|
|
|
|
|
|
'user_roles', |
23
|
|
|
|
|
|
|
'AproJo::DB::Schema::Result::UserRole', |
24
|
|
|
|
|
|
|
{'foreign.role_id' => 'self.role_id'}, |
25
|
|
|
|
|
|
|
{cascade_copy => 0, cascade_delete => 0}, |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__PACKAGE__->many_to_many('user_ids', 'user_roles', 'user_id'); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |