blib/lib/Strehler/Schema/Result/Article.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use utf8;
2 package Strehler::Schema::Result::Article;
3 $Strehler::Schema::Result::Article::VERSION = '1.6.8';
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6  
7 =head1 NAME
8  
9 Strehler::Schema::Result::Article
10  
11 =cut
12  
13 use strict;
14 use warnings;
15  
16 use base 'DBIx::Class::Core';
17  
18 =head1 COMPONENTS LOADED
19  
20 =over 4
21  
22 =item * L<DBIx::Class::InflateColumn::DateTime>
23  
24 =back
25  
26 =cut
27  
28 __PACKAGE__->load_components("InflateColumn::DateTime");
29  
30 =head1 TABLE: C<ARTICLES>
31  
32 =cut
33  
34 __PACKAGE__->table("ARTICLES");
35  
36 =head1 ACCESSORS
37  
38 =head2 id
39  
40 data_type: 'integer'
41 is_auto_increment: 1
42 is_nullable: 0
43  
44 =head2 image
45  
46 data_type: 'varchar'
47 is_nullable: 1
48 size: 50
49  
50 =head2 category
51  
52 data_type: 'integer'
53 is_foreign_key: 1
54 is_nullable: 1
55  
56 =head2 display_order
57  
58 data_type: 'integer'
59 is_nullable: 1
60  
61 =head2 publish_date
62  
63 data_type: 'date'
64 datetime_undef_if_invalid: 1
65 is_nullable: 1
66  
67 =head2 published
68  
69 data_type: 'tinyint'
70 is_nullable: 1
71  
72 =cut
73  
74 __PACKAGE__->add_columns(
75 "id",
76 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77 "image",
78 { data_type => "varchar", is_nullable => 1, size => 50 },
79 "category",
80 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
81 "display_order",
82 { data_type => "integer", is_nullable => 1 },
83 "publish_date",
84 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
85 "published",
86 { data_type => "tinyint", is_nullable => 1 },
87 );
88  
89 =head1 PRIMARY KEY
90  
91 =over 4
92  
93 =item * L</id>
94  
95 =back
96  
97 =cut
98  
99 __PACKAGE__->set_primary_key("id");
100  
101 =head1 RELATIONS
102  
103 =head2 category
104  
105 Type: belongs_to
106  
107 Related object: L<Strehler::Schema::Result::Category>
108  
109 =cut
110  
111 __PACKAGE__->belongs_to(
112 "category",
113 "Strehler::Schema::Result::Category",
114 { id => "category" },
115 {
116 is_deferrable => 1,
117 join_type => "LEFT",
118 on_delete => "RESTRICT",
119 on_update => "RESTRICT",
120 },
121 );
122  
123 =head2 contents
124  
125 Type: has_many
126  
127 Related object: L<Strehler::Schema::Result::Content>
128  
129 =cut
130  
131 __PACKAGE__->has_many(
132 "contents",
133 "Strehler::Schema::Result::Content",
134 { "foreign.article" => "self.id" },
135 { cascade_copy => 0, cascade_delete => 0 },
136 );
137  
138  
139 # Created by DBIx::Class::Schema::Loader v0.07037 @ 2014-03-30 16:02:43
140 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:n0dlyBES+E6X32y9cRU70g
141  
142  
143 # You can replace this text with custom code or comments, and it will be preserved on regeneration
144  
145 1;