File Coverage

blib/lib/RapidApp/CoreSchema/Result/DefaultView.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package RapidApp::CoreSchema::Result::DefaultView;
2              
3 1     1   609 use strict;
  1         3  
  1         30  
4 1     1   5 use warnings;
  1         3  
  1         30  
5              
6 1     1   5 use Moose;
  1         2  
  1         7  
7 1     1   6050 use MooseX::NonMoose;
  1         3  
  1         10  
8 1     1   4967 use namespace::autoclean;
  1         2  
  1         10  
9             extends 'DBIx::Class::Core';
10              
11             __PACKAGE__->table("default_view");
12              
13             __PACKAGE__->add_columns(
14             "source_model" => {
15             data_type => "varchar",
16             is_nullable => 0,
17             size => 255
18             },
19             "view_id" => {
20             data_type => "integer",
21             extra => { unsigned => 1 },
22             is_nullable => 1,
23             },
24             );
25             __PACKAGE__->set_primary_key("source_model");
26              
27              
28             __PACKAGE__->belongs_to(
29             "view",
30             "RapidApp::CoreSchema::Result::SavedState",
31             { id => "view_id" },
32             {
33             is_deferrable => 1,
34             join_type => "LEFT",
35             on_delete => "CASCADE",
36             on_update => "CASCADE",
37             },
38             );
39              
40              
41             __PACKAGE__->load_components('+RapidApp::DBIC::Component::TableSpec');
42             __PACKAGE__->apply_TableSpec;
43              
44             __PACKAGE__->TableSpec_set_conf(
45             title => 'Source Default View',
46             title_multi => 'Source Default Views',
47             iconCls => 'ra-icon-data-preferences',
48             multiIconCls => 'ra-icon-data-preferences',
49             display_column => 'source_model'
50             );
51              
52             __PACKAGE__->TableSpec_set_conf('column_properties_ordered',
53              
54             view_id => { no_column => \1, no_multifilter => \1, no_quick_search => \1 },
55              
56             source_model => {
57             header => 'Source/Model',
58             width => 250,
59             allow_add => \0,
60             allow_edit => \0
61             },
62            
63             view => {
64             header => 'View',
65             width => 225,
66             allow_add => \0,
67             }
68            
69             );
70              
71              
72             # You can replace this text with custom content, and it will be preserved on regeneration
73             __PACKAGE__->meta->make_immutable;
74             1;