« Tapper/Schema/TestrunDB/Result/NotificationEvent.pm
↑ Summary
Tapper/Schema/TestrunDB/Result/ReportSection.pm »
| 1 | package Tapper::Schema::TestrunDB::Result::State; | ||
| 2 | 10 | our $AUTHORITY = 'cpan:TAPPER'; | |
| 3 | 10 | $Tapper::Schema::TestrunDB::Result::State::VERSION = '5.0.12'; | |
| 4 | # ABSTRACT: Tapper - Containg states for testrun's | ||
| 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 InflateColumn::Object::Enum Core/); | |
| 13 | 10 | __PACKAGE__->table("state"); | |
| 14 | 10 | __PACKAGE__->add_columns | |
| 15 | ( "id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_auto_increment => 1, }, | ||
| 16 | "testrun_id", { data_type => "INT", default_value => undef, is_nullable => 0, size => 11, is_foreign_key => 1, }, | ||
| 17 | "state", { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 65000, }, | ||
| 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 | __PACKAGE__->inflate_column( state => { | ||
| 22 | 0 | ▶ | inflate => sub { Load(shift) }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 23 | 0 | ▶ | deflate => sub { Dump(shift)}, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 24 | 10 | }); | |
| 25 | |||
| 26 | |||
| 27 | 10 | (my $basepkg = __PACKAGE__) =~ s/::\w+$//; | |
| 28 | |||
| 29 | 10 | __PACKAGE__->set_primary_key("id"); | |
| 30 | 10 | __PACKAGE__->add_unique_constraint( unique_testrun_id => [ qw/testrun_id/ ], ); | |
| 31 | 10 | __PACKAGE__->belongs_to( testrun => "${basepkg}::Testrun", { 'foreign.id' => 'self.testrun_id' }); | |
| 32 | |||
| 33 | 10 | 1; | |
| 34 | |||
| 35 | __END__ | ||