blib/lib/RackTables/Schema/Result/AttributeMap.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/RackTables/Schema/Result/Attribute.pm ↑ Summary blib/lib/RackTables/Schema/Result/AttributeValue.pm »
1 package RackTables::Schema::Result::AttributeMap;
2  
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use MooseX::NonMoose;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 extends 'DBIx::Class::Core';
13  
14  
15 =head1 NAME
16  
17 RackTables::Schema::Result::AttributeMap
18  
19 =cut
20  
21 1 __PACKAGE__->table("AttributeMap");
22  
23 =head1 ACCESSORS
24  
25 =head2 objtype_id
26  
27 data_type: 'integer'
28 default_value: 1
29 extra: {unsigned => 1}
30 is_nullable: 0
31  
32 =head2 attr_id
33  
34 data_type: 'integer'
35 default_value: 1
36 extra: {unsigned => 1}
37 is_foreign_key: 1
38 is_nullable: 0
39  
40 =head2 chapter_id
41  
42 data_type: 'integer'
43 extra: {unsigned => 1}
44 is_nullable: 1
45  
46 =cut
47  
48 1 __PACKAGE__->add_columns(
49 "objtype_id",
50 {
51 data_type => "integer",
52 default_value => 1,
53 extra => { unsigned => 1 },
54 is_nullable => 0,
55 },
56 "attr_id",
57 {
58 data_type => "integer",
59 default_value => 1,
60 extra => { unsigned => 1 },
61 is_foreign_key => 1,
62 is_nullable => 0,
63 },
64 "chapter_id",
65 { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 },
66 );
67 1 __PACKAGE__->add_unique_constraint("objtype_id", ["objtype_id", "attr_id"]);
68  
69 =head1 RELATIONS
70  
71 =head2 attr
72  
73 Type: belongs_to
74  
75 Related object: L<RackTables::Schema::Result::Attribute>
76  
77 =cut
78  
79 1 __PACKAGE__->belongs_to(
80 "attr",
81 "RackTables::Schema::Result::Attribute",
82 { id => "attr_id" },
83 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
84 );
85  
86 =head2 attribute_values
87  
88 Type: has_many
89  
90 Related object: L<RackTables::Schema::Result::AttributeValue>
91  
92 =cut
93  
94 1 __PACKAGE__->has_many(
95 "attribute_values",
96 "RackTables::Schema::Result::AttributeValue",
97 { "foreign.attr_id" => "self.attr_id" },
98 { cascade_copy => 0, cascade_delete => 0 },
99 );
100  
101  
102 # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02
103 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:b4V5EhZXnAdHfuRs31A4AA
104  
105  
106 # You can replace this text with custom code or comments, and it will be preserved on regeneration
107 1 __PACKAGE__->meta->make_immutable;
108  
109 # declare primary keys
110 1 __PACKAGE__->set_primary_key(qw< objtype_id attr_id >);
111  
112 # hidden relationship
113 1 __PACKAGE__->belongs_to(
114 chapter => "RackTables::Result::Chapter",
115 { id => "chapter_id" },
116 );
117  
118  
119 1 1;
« blib/lib/RackTables/Schema/Result/Attribute.pm ↑ Summary blib/lib/RackTables/Schema/Result/AttributeValue.pm »