File Coverage

blib/lib/Tapper/Schema/TestrunDB/Result/HostFeature.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Tapper::Schema::TestrunDB::Result::HostFeature;
2             our $AUTHORITY = 'cpan:TAPPER';
3             $Tapper::Schema::TestrunDB::Result::HostFeature::VERSION = '5.0.11';
4             # ABSTRACT: Tapper - Containing features for hosts
5              
6 7     7   3471 use 5.010;
  7         26  
7 7     7   35 use strict;
  7         21  
  7         310  
8 7     7   33 use warnings;
  7         12  
  7         214  
9              
10 7     7   37 use parent 'DBIx::Class';
  7         13  
  7         39  
11              
12             __PACKAGE__->load_components(qw/InflateColumn::DateTime Core/);
13             __PACKAGE__->table("host_feature");
14             __PACKAGE__->add_columns
15             (
16             "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, },
17             "host_id", { data_type => "INT", default_value => undef, is_nullable => 0, },
18             # can't call it key because that's a SQL keyword
19             "entry", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, },
20             "value", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, },
21             "created_at", { data_type => "TIMESTAMP", default_value => \'CURRENT_TIMESTAMP', is_nullable => 1, },
22             "updated_at", { data_type => "DATETIME", default_value => undef, is_nullable => 1, },
23              
24             );
25              
26             __PACKAGE__->set_primary_key("id");
27              
28             (my $basepkg = __PACKAGE__) =~ s/::\w+$//;
29              
30             __PACKAGE__->belongs_to( host => "${basepkg}::Host", { 'foreign.id' => 'self.host_id' });
31              
32              
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             Tapper::Schema::TestrunDB::Result::HostFeature - Tapper - Containing features for hosts
44              
45             =head1 AUTHORS
46              
47             =over 4
48              
49             =item *
50              
51             AMD OSRC Tapper Team <tapper@amd64.org>
52              
53             =item *
54              
55             Tapper Team <tapper-ops@amazon.com>
56              
57             =back
58              
59             =head1 COPYRIGHT AND LICENSE
60              
61             This software is Copyright (c) 2019 by Advanced Micro Devices, Inc..
62              
63             This is free software, licensed under:
64              
65             The (two-clause) FreeBSD License
66              
67             =cut