| 1 | package Tapper::Schema::TestrunDB::Result::NotificationEvent; | ||
| 2 | 10 | our $AUTHORITY = 'cpan:TAPPER'; | |
| 3 | 10 | $Tapper::Schema::TestrunDB::Result::NotificationEvent::VERSION = '5.0.12'; | |
| 4 | # ABSTRACT: Tapper - Keep data about events that may trigger notifications | ||
| 5 | |||
| 6 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 10 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 10 | ▶ | use parent 'DBIx::Class'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 10 | ▶ | use YAML::Syck; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 10 | __PACKAGE__->load_components(qw/InflateColumn::DateTime Core InflateColumn/); | |
| 13 | 10 | __PACKAGE__->table("notification_event"); | |
| 14 | 10 | __PACKAGE__->add_columns | |
| 15 | ( "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, }, | ||
| 16 | "message", { data_type => "VARCHAR", default_value => undef, size => 255, is_nullable => 1, }, | ||
| 17 | "type", { data_type => "VARCHAR", is_nullable => 1, size => 255, is_enum => 1, extra => { list => [qw(testrun_finished report_received)] } }, | ||
| 18 | "created_at", { data_type => "TIMESTAMP", default_value => \'CURRENT_TIMESTAMP', is_nullable => 1, }, | ||
| 19 | "updated_at", { data_type => "DATETIME", default_value => undef, is_nullable => 1, }, | ||
| 20 | ); | ||
| 21 | |||
| 22 | 10 | (my $basepkg = __PACKAGE__) =~ s/::\w+$//; | |
| 23 | |||
| 24 | __PACKAGE__->inflate_column( message => { | ||
| 25 | 0 | ▶ | inflate => sub { Load(shift) }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 26 | 0 | ▶ | deflate => sub { Dump(shift)}, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 27 | 10 | }); | |
| 28 | |||
| 29 | |||
| 30 | 10 | __PACKAGE__->set_primary_key("id"); | |
| 31 | |||
| 32 | 10 | 1; | |
| 33 | |||
| 34 | __END__ | ||