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

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 30 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::Category;
3 $Strehler::Schema::Result::Category::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::Category
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<CATEGORIES>
31  
32 =cut
33  
34 __PACKAGE__->table("CATEGORIES");
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 category
45  
46 data_type: 'varchar'
47 is_nullable: 1
48 size: 120
49  
50 =head2 parent
51  
52 data_type: 'integer'
53 is_foreign_key: 1
54 is_nullable: 1
55  
56 =cut
57  
58 __PACKAGE__->add_columns(
59 "id",
60 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
61 "category",
62 { data_type => "varchar", is_nullable => 1, size => 120 },
63 "parent",
64 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
65 );
66  
67 =head1 PRIMARY KEY
68  
69 =over 4
70  
71 =item * L</id>
72  
73 =back
74  
75 =cut
76  
77 __PACKAGE__->set_primary_key("id");
78  
79 =head1 RELATIONS
80  
81 =head2 articles
82  
83 Type: has_many
84  
85 Related object: L<Strehler::Schema::Result::Article>
86  
87 =cut
88  
89 __PACKAGE__->has_many(
90 "articles",
91 "Strehler::Schema::Result::Article",
92 { "foreign.category" => "self.id" },
93 { cascade_copy => 0, cascade_delete => 0 },
94 );
95  
96 =head2 categories
97  
98 Type: has_many
99  
100 Related object: L<Strehler::Schema::Result::Category>
101  
102 =cut
103  
104 __PACKAGE__->has_many(
105 "categories",
106 "Strehler::Schema::Result::Category",
107 { "foreign.parent" => "self.id" },
108 { cascade_copy => 0, cascade_delete => 0 },
109 );
110  
111 =head2 configured_tags
112  
113 Type: has_many
114  
115 Related object: L<Strehler::Schema::Result::ConfiguredTag>
116  
117 =cut
118  
119 __PACKAGE__->has_many(
120 "configured_tags",
121 "Strehler::Schema::Result::ConfiguredTag",
122 { "foreign.category_id" => "self.id" },
123 { cascade_copy => 0, cascade_delete => 0 },
124 );
125  
126 =head2 images
127  
128 Type: has_many
129  
130 Related object: L<Strehler::Schema::Result::Image>
131  
132 =cut
133  
134 __PACKAGE__->has_many(
135 "images",
136 "Strehler::Schema::Result::Image",
137 { "foreign.category" => "self.id" },
138 { cascade_copy => 0, cascade_delete => 0 },
139 );
140  
141 =head2 parent
142  
143 Type: belongs_to
144  
145 Related object: L<Strehler::Schema::Result::Category>
146  
147 =cut
148  
149 __PACKAGE__->belongs_to(
150 "parent",
151 "Strehler::Schema::Result::Category",
152 { id => "parent" },
153 {
154 is_deferrable => 1,
155 join_type => "LEFT",
156 on_delete => "RESTRICT",
157 on_update => "RESTRICT",
158 },
159 );
160  
161  
162 # Created by DBIx::Class::Schema::Loader v0.07037 @ 2014-03-15 15:14:27
163 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Dv3xqQdvUCmjbER8yENXTg
164  
165  
166 # You can replace this text with custom code or comments, and it will be preserved on regeneration
167  
168 1;