File Coverage

blib/lib/Tapper/Schema/TestrunDB/Result/Contact.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package Tapper::Schema::TestrunDB::Result::Contact;
2             our $AUTHORITY = 'cpan:TAPPER';
3             $Tapper::Schema::TestrunDB::Result::Contact::VERSION = '5.0.11';
4             # ABSTRACT: Tapper - Keep contact information for owners
5              
6 7     7   3532 use strict;
  7         15  
  7         219  
7 7     7   31 use warnings;
  7         14  
  7         204  
8              
9 7     7   32 use parent 'DBIx::Class';
  7         14  
  7         40  
10 7     7   356 use YAML::Syck;
  7         14  
  7         1452  
11              
12             __PACKAGE__->load_components(qw/InflateColumn::DateTime Core/);
13             __PACKAGE__->table("contact");
14             __PACKAGE__->add_columns
15             ( "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, },
16             "owner_id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_foreign_key => 1, extra => { renamed_from => 'user_id' }, },
17             "address", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, },
18             "protocol", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, },
19             "created_at", { data_type => "TIMESTAMP", default_value => \'CURRENT_TIMESTAMP', is_nullable => 1, },
20             "updated_at", { data_type => "DATETIME", default_value => undef, is_nullable => 1, },
21             );
22              
23              
24             (my $basepkg = __PACKAGE__) =~ s/::\w+$//;
25              
26             __PACKAGE__->set_primary_key("id");
27             __PACKAGE__->belongs_to( owner => "${basepkg}::Owner", { 'foreign.id' => 'self.owner_id' });
28              
29             1;
30              
31             __END__
32              
33             =pod
34              
35             =encoding UTF-8
36              
37             =head1 NAME
38              
39             Tapper::Schema::TestrunDB::Result::Contact - Tapper - Keep contact information for owners
40              
41             =head1 AUTHORS
42              
43             =over 4
44              
45             =item *
46              
47             AMD OSRC Tapper Team <tapper@amd64.org>
48              
49             =item *
50              
51             Tapper Team <tapper-ops@amazon.com>
52              
53             =back
54              
55             =head1 COPYRIGHT AND LICENSE
56              
57             This software is Copyright (c) 2019 by Advanced Micro Devices, Inc..
58              
59             This is free software, licensed under:
60              
61             The (two-clause) FreeBSD License
62              
63             =cut