lib/Mojolicious/Plugin/Fondation/Perm/Schema/Result/Perm.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Mojolicious/Plugin/Fondation/Perm/Schema/Result/GroupPerm.pm ↑ Summary
1 package Mojolicious::Plugin::Fondation::Perm::Schema::Result::Perm;
2 1 $Mojolicious::Plugin::Fondation::Perm::Schema::Result::Perm::VERSION = '0.04';
3 # ABSTRACT: DBIx::Class Result class for perms table
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use base 'Mojolicious::Plugin::Fondation::Schema::Result::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 __PACKAGE__->load_components(qw/TimeStamp Core/);
11  
12 1 __PACKAGE__->table('perms');
13  
14 1 __PACKAGE__->add_columns(
15 id => { data_type => 'integer', is_auto_increment => 1, is_nullable => 0 },
16  
17 name => {
18 data_type => 'varchar',
19 size => 255,
20 is_nullable => 0,
21 extra => {
22 openapi => {
23 minLength => 2,
24 pattern => '^[a-zA-Z0-9 _-]{2,}$',
25 }
26 },
27 },
28  
29 description => {
30 data_type => 'varchar',
31 size => 255,
32 is_nullable => 1,
33 },
34  
35 created_at => { data_type => 'datetime', is_nullable => 0, set_on_create => 1, set_on_update => 1 },
36  
37 updated_at => { data_type => 'datetime', is_nullable => 0, set_on_create => 1, set_on_update => 1 },
38 );
39  
40 1 __PACKAGE__->set_primary_key('id');
41  
42 1 __PACKAGE__->has_many(
43 'group_perm',
44 'Mojolicious::Plugin::Fondation::Perm::Schema::Result::GroupPerm',
45 'perm_id',
46 );
47  
48 1 1;
49  
50 __END__
« lib/Mojolicious/Plugin/Fondation/Perm/Schema/Result/GroupPerm.pm ↑ Summary