File Coverage

blib/lib/Tapper/Schema/TestrunDB/Result/Notification.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::Notification;
2             our $AUTHORITY = 'cpan:TAPPER';
3             $Tapper::Schema::TestrunDB::Result::Notification::VERSION = '5.0.11';
4             # ABSTRACT: Tapper - Keep data about notification subscriptions
5              
6 7     7   3232 use strict;
  7         16  
  7         178  
7 7     7   30 use warnings;
  7         13  
  7         156  
8              
9 7     7   29 use parent 'DBIx::Class';
  7         12  
  7         34  
10 7     7   330 use YAML::Syck;
  7         14  
  7         1511  
11              
12             __PACKAGE__->load_components(qw/InflateColumn::DateTime Core/);
13             __PACKAGE__->table("notification");
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 => 1, size => 11, is_foreign_key => 1, extra => { renamed_from => 'user_id' }, },
17             "persist", { data_type => "INT", default_value => undef, is_nullable => 1, size => 1, },
18             "event", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255, }, # subscribe to this event type
19             "filter", { data_type => "TEXT", default_value => undef, is_nullable => 0, }, # data for check handler
20             "comment", { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 255, }, # what shall we send
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             (my $basepkg = __PACKAGE__) =~ s/::\w+$//;
26              
27             __PACKAGE__->set_primary_key("id");
28             __PACKAGE__->belongs_to( owner => "${basepkg}::Owner", { 'foreign.id' => 'self.owner_id' });
29              
30             1;
31              
32             __END__
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             Tapper::Schema::TestrunDB::Result::Notification - Tapper - Keep data about notification subscriptions
41              
42             =head1 AUTHORS
43              
44             =over 4
45              
46             =item *
47              
48             AMD OSRC Tapper Team <tapper@amd64.org>
49              
50             =item *
51              
52             Tapper Team <tapper-ops@amazon.com>
53              
54             =back
55              
56             =head1 COPYRIGHT AND LICENSE
57              
58             This software is Copyright (c) 2019 by Advanced Micro Devices, Inc..
59              
60             This is free software, licensed under:
61              
62             The (two-clause) FreeBSD License
63              
64             =cut