RackTables/0_20_9/Result/AttributeMap.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RackTables/0_20_9/Result/Attribute.pm ↑ Summary RackTables/0_20_9/Result/AttributeValue.pm »
1 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Schema::RackTables::0_20_9::Result::AttributeMap;
3  
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6  
7 =head1 NAME
8  
9 Schema::RackTables::0_20_9::Result::AttributeMap
10  
11 =cut
12  
13 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 ▶use base 'DBIx::Class::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
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 1 __PACKAGE__->load_components("InflateColumn::DateTime");
29  
30 =head1 TABLE: C<AttributeMap>
31  
32 =cut
33  
34 1 __PACKAGE__->table("AttributeMap");
35  
36 =head1 ACCESSORS
37  
38 =head2 objtype_id
39  
40 data_type: 'integer'
41 default_value: 1
42 extra: {unsigned => 1}
43 is_nullable: 0
44  
45 =head2 attr_id
46  
47 data_type: 'integer'
48 default_value: 1
49 extra: {unsigned => 1}
50 is_foreign_key: 1
51 is_nullable: 0
52  
53 =head2 chapter_id
54  
55 data_type: 'integer'
56 extra: {unsigned => 1}
57 is_foreign_key: 1
58 is_nullable: 1
59  
60 =head2 sticky
61  
62 data_type: 'enum'
63 default_value: 'no'
64 extra: {list => ["yes","no"]}
65 is_nullable: 1
66  
67 =cut
68  
69 1 __PACKAGE__->add_columns(
70 "objtype_id",
71 {
72 data_type => "integer",
73 default_value => 1,
74 extra => { unsigned => 1 },
75 is_nullable => 0,
76 },
77 "attr_id",
78 {
79 data_type => "integer",
80 default_value => 1,
81 extra => { unsigned => 1 },
82 is_foreign_key => 1,
83 is_nullable => 0,
84 },
85 "chapter_id",
86 {
87 data_type => "integer",
88 extra => { unsigned => 1 },
89 is_foreign_key => 1,
90 is_nullable => 1,
91 },
92 "sticky",
93 {
94 data_type => "enum",
95 default_value => "no",
96 extra => { list => ["yes", "no"] },
97 is_nullable => 1,
98 },
99 );
100  
101 =head1 UNIQUE CONSTRAINTS
102  
103 =head2 C<objtype_id>
104  
105 =over 4
106  
107 =item * L</objtype_id>
108  
109 =item * L</attr_id>
110  
111 =back
112  
113 =cut
114  
115 1 __PACKAGE__->add_unique_constraint("objtype_id", ["objtype_id", "attr_id"]);
116  
117 =head1 RELATIONS
118  
119 =head2 attr
120  
121 Type: belongs_to
122  
123 Related object: L<Schema::RackTables::0_20_9::Result::Attribute>
124  
125 =cut
126  
127 1 __PACKAGE__->belongs_to(
128 "attr",
129 "Schema::RackTables::0_20_9::Result::Attribute",
130 { id => "attr_id" },
131 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
132 );
133  
134 =head2 attribute_values
135  
136 Type: has_many
137  
138 Related object: L<Schema::RackTables::0_20_9::Result::AttributeValue>
139  
140 =cut
141  
142 1 __PACKAGE__->has_many(
143 "attribute_values",
144 "Schema::RackTables::0_20_9::Result::AttributeValue",
145 {
146 "foreign.attr_id" => "self.attr_id",
147 "foreign.object_tid" => "self.objtype_id",
148 },
149 { cascade_copy => 0, cascade_delete => 0 },
150 );
151  
152 =head2 chapter
153  
154 Type: belongs_to
155  
156 Related object: L<Schema::RackTables::0_20_9::Result::Chapter>
157  
158 =cut
159  
160 1 __PACKAGE__->belongs_to(
161 "chapter",
162 "Schema::RackTables::0_20_9::Result::Chapter",
163 { id => "chapter_id" },
164 {
165 is_deferrable => 1,
166 join_type => "LEFT",
167 on_delete => "RESTRICT",
168 on_update => "RESTRICT",
169 },
170 );
171  
172  
173 # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:01:01
174 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AjwfvcWzHcHjtRnKOYvtug
175  
176  
177 # You can replace this text with custom code or comments, and it will be preserved on regeneration
178 1 1;
« RackTables/0_20_9/Result/Attribute.pm ↑ Summary RackTables/0_20_9/Result/AttributeValue.pm »