AproJo/DB/Schema/Result/UserGroup.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« AproJo/DB/Schema/Result/User.pm ↑ Summary AproJo/DB/Schema/Result/UserRole.pm »
1 package AproJo::DB::Schema::Result::UserGroup;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use base 'DBIx::Class::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 __PACKAGE__->table('users_groups');
9  
10 2 __PACKAGE__->add_columns(
11 'user_id', {data_type => 'integer', is_nullable => 0, is_foreign_key => 1},
12 'group_id',
13 {data_type => 'integer', is_nullable => 0, is_foreign_key => 1},
14 );
15  
16 2 __PACKAGE__->set_primary_key('user_id', 'group_id');
17  
18 2 __PACKAGE__->belongs_to(
19 'group_id',
20 'AproJo::DB::Schema::Result::Group',
21 {group_id => 'group_id'},
22 {is_deferrable => 1, on_delete => 'CASCADE', on_update => 'CASCADE'},
23 );
24  
25 2 __PACKAGE__->belongs_to(
26 'user_id',
27 'AproJo::DB::Schema::Result::User',
28 {user_id => 'user_id'},
29 {is_deferrable => 1, on_delete => 'CASCADE', on_update => 'CASCADE'},
30 );
31  
32 2 1;
« AproJo/DB/Schema/Result/User.pm ↑ Summary AproJo/DB/Schema/Result/UserRole.pm »