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

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 29 / 29 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/PortVLANMode.pm ↑ Summary blib/lib/RackTables/Schema/Result/RackHistory.pm »
1 package RackTables::Schema::Result::Rack;
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::Rack
18  
19 =cut
20  
21 1 __PACKAGE__->table("Rack");
22  
23 =head1 ACCESSORS
24  
25 =head2 id
26  
27 data_type: 'integer'
28 extra: {unsigned => 1}
29 is_auto_increment: 1
30 is_nullable: 0
31  
32 =head2 name
33  
34 data_type: 'char'
35 is_nullable: 1
36 size: 255
37  
38 =head2 row_id
39  
40 data_type: 'integer'
41 default_value: 1
42 extra: {unsigned => 1}
43 is_foreign_key: 1
44 is_nullable: 0
45  
46 =head2 height
47  
48 data_type: 'tinyint'
49 default_value: 42
50 extra: {unsigned => 1}
51 is_nullable: 0
52  
53 =head2 comment
54  
55 data_type: 'text'
56 is_nullable: 1
57  
58 =head2 thumb_data
59  
60 data_type: 'blob'
61 is_nullable: 1
62  
63 =cut
64  
65 1 __PACKAGE__->add_columns(
66 "id",
67 {
68 data_type => "integer",
69 extra => { unsigned => 1 },
70 is_auto_increment => 1,
71 is_nullable => 0,
72 },
73 "name",
74 { data_type => "char", is_nullable => 1, size => 255 },
75 "row_id",
76 {
77 data_type => "integer",
78 default_value => 1,
79 extra => { unsigned => 1 },
80 is_foreign_key => 1,
81 is_nullable => 0,
82 },
83 "height",
84 {
85 data_type => "tinyint",
86 default_value => 42,
87 extra => { unsigned => 1 },
88 is_nullable => 0,
89 },
90 "comment",
91 { data_type => "text", is_nullable => 1 },
92 "thumb_data",
93 { data_type => "blob", is_nullable => 1 },
94 );
95 1 __PACKAGE__->set_primary_key("id");
96 1 __PACKAGE__->add_unique_constraint("name_in_row", ["row_id", "name"]);
97  
98 =head1 RELATIONS
99  
100 =head2 row
101  
102 Type: belongs_to
103  
104 Related object: L<RackTables::Schema::Result::RackRow>
105  
106 =cut
107  
108 1 __PACKAGE__->belongs_to(
109 "row",
110 "RackTables::Schema::Result::RackRow",
111 { id => "row_id" },
112 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
113 );
114  
115 =head2 rack_spaces
116  
117 Type: has_many
118  
119 Related object: L<RackTables::Schema::Result::RackSpace>
120  
121 =cut
122  
123 1 __PACKAGE__->has_many(
124 "rack_spaces",
125 "RackTables::Schema::Result::RackSpace",
126 { "foreign.rack_id" => "self.id" },
127 { cascade_copy => 0, cascade_delete => 0 },
128 );
129  
130  
131 # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02
132 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M/7KHhuNcqu32rfclM6+jg
133  
134  
135 # You can replace this text with custom code or comments, and it will be preserved on regeneration
136 1 __PACKAGE__->meta->make_immutable;
137 1 1;
« blib/lib/RackTables/Schema/Result/PortVLANMode.pm ↑ Summary blib/lib/RackTables/Schema/Result/RackHistory.pm »