« Tapper/Schema/TestrunDB/Result/ChartTags.pm
↑ Summary
Tapper/Schema/TestrunDB/Result/ChartTinyUrlRelations.pm »
| 1 | package Tapper::Schema::TestrunDB::Result::ChartTinyUrlLines; | ||
| 2 | 10 | our $AUTHORITY = 'cpan:TAPPER'; | |
| 3 | 10 | $Tapper::Schema::TestrunDB::Result::ChartTinyUrlLines::VERSION = '5.0.12'; | |
| 4 | # ABSTRACT: Tapper - Keep static Chart Url lines for Tapper-Reports-Web-GUI | ||
| 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 | |||
| 11 | 10 | __PACKAGE__->load_components(qw/InflateColumn::DateTime Core/); | |
| 12 | 10 | __PACKAGE__->table('chart_tiny_url_lines'); | |
| 13 | 10 | __PACKAGE__->add_columns( | |
| 14 | 'chart_tiny_url_line_id', { | ||
| 15 | data_type => 'INT', | ||
| 16 | default_value => undef, | ||
| 17 | is_nullable => 0, | ||
| 18 | size => 12, | ||
| 19 | is_auto_increment => 1, | ||
| 20 | extra => { | ||
| 21 | unsigned => 1, | ||
| 22 | }, | ||
| 23 | }, | ||
| 24 | 'chart_tiny_url_id', { | ||
| 25 | data_type => 'INT', | ||
| 26 | default_value => undef, | ||
| 27 | is_nullable => 0, | ||
| 28 | size => 12, | ||
| 29 | is_foreign_key => 1, | ||
| 30 | extra => { | ||
| 31 | unsigned => 1, | ||
| 32 | }, | ||
| 33 | }, | ||
| 34 | 'chart_line_id', { | ||
| 35 | data_type => 'INT', | ||
| 36 | default_value => undef, | ||
| 37 | is_nullable => 0, | ||
| 38 | size => 12, | ||
| 39 | is_foreign_key => 1, | ||
| 40 | extra => { | ||
| 41 | unsigned => 1, | ||
| 42 | }, | ||
| 43 | }, | ||
| 44 | ); | ||
| 45 | |||
| 46 | 10 | (my $basepkg = __PACKAGE__) =~ s/::\w+$//; | |
| 47 | |||
| 48 | 10 | __PACKAGE__->set_primary_key( | |
| 49 | 'chart_tiny_url_line_id', | ||
| 50 | ); | ||
| 51 | |||
| 52 | 10 | __PACKAGE__->belongs_to( | |
| 53 | chart_tiny_url => "${basepkg}::ChartTinyUrls", { 'foreign.chart_tiny_url_id' => 'self.chart_tiny_url_id' }, | ||
| 54 | ); | ||
| 55 | 10 | __PACKAGE__->belongs_to( | |
| 56 | chart_line => "${basepkg}::ChartLines", { 'foreign.chart_line_id' => 'self.chart_line_id' }, | ||
| 57 | ); | ||
| 58 | 10 | __PACKAGE__->has_many ( | |
| 59 | chart_tiny_url_relation => "${basepkg}::ChartTinyUrlRelations", { 'foreign.chart_tiny_url_line_id' => 'self.chart_tiny_url_line_id' }, | ||
| 60 | ); | ||
| 61 | |||
| 62 | 10 | 1; | |
| 63 | |||
| 64 | __END__ | ||