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

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 31 / 31 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/ObjectParentCompat.pm ↑ Summary blib/lib/RackTables/Schema/Result/PortAllowedVLAN.pm »
1 package RackTables::Schema::Result::Port;
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::Port
18  
19 =cut
20  
21 1 __PACKAGE__->table("Port");
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 object_id
33  
34 data_type: 'integer'
35 default_value: 0
36 extra: {unsigned => 1}
37 is_foreign_key: 1
38 is_nullable: 0
39  
40 =head2 name
41  
42 data_type: 'char'
43 default_value: (empty string)
44 is_nullable: 0
45 size: 255
46  
47 =head2 iif_id
48  
49 data_type: 'integer'
50 extra: {unsigned => 1}
51 is_foreign_key: 1
52 is_nullable: 0
53  
54 =head2 type
55  
56 data_type: 'integer'
57 default_value: 0
58 extra: {unsigned => 1}
59 is_foreign_key: 1
60 is_nullable: 0
61  
62 =head2 l2address
63  
64 data_type: 'char'
65 is_nullable: 1
66 size: 64
67  
68 =head2 reservation_comment
69  
70 data_type: 'char'
71 is_nullable: 1
72 size: 255
73  
74 =head2 label
75  
76 data_type: 'char'
77 is_nullable: 1
78 size: 255
79  
80 =cut
81  
82 1 __PACKAGE__->add_columns(
83 "id",
84 {
85 data_type => "integer",
86 extra => { unsigned => 1 },
87 is_auto_increment => 1,
88 is_nullable => 0,
89 },
90 "object_id",
91 {
92 data_type => "integer",
93 default_value => 0,
94 extra => { unsigned => 1 },
95 is_foreign_key => 1,
96 is_nullable => 0,
97 },
98 "name",
99 { data_type => "char", default_value => "", is_nullable => 0, size => 255 },
100 "iif_id",
101 {
102 data_type => "integer",
103 extra => { unsigned => 1 },
104 is_foreign_key => 1,
105 is_nullable => 0,
106 },
107 "type",
108 {
109 data_type => "integer",
110 default_value => 0,
111 extra => { unsigned => 1 },
112 is_foreign_key => 1,
113 is_nullable => 0,
114 },
115 "l2address",
116 { data_type => "char", is_nullable => 1, size => 64 },
117 "reservation_comment",
118 { data_type => "char", is_nullable => 1, size => 255 },
119 "label",
120 { data_type => "char", is_nullable => 1, size => 255 },
121 );
122 1 __PACKAGE__->set_primary_key("id");
123 1 __PACKAGE__->add_unique_constraint(
124 "object_iif_oif_name",
125 ["object_id", "iif_id", "type", "name"],
126 );
127  
128 =head1 RELATIONS
129  
130 =head2 link_porta
131  
132 Type: might_have
133  
134 Related object: L<RackTables::Schema::Result::Link>
135  
136 =cut
137  
138 1 __PACKAGE__->might_have(
139 "link_porta",
140 "RackTables::Schema::Result::Link",
141 { "foreign.porta" => "self.id" },
142 { cascade_copy => 0, cascade_delete => 0 },
143 );
144  
145 =head2 link_portb
146  
147 Type: might_have
148  
149 Related object: L<RackTables::Schema::Result::Link>
150  
151 =cut
152  
153 1 __PACKAGE__->might_have(
154 "link_portb",
155 "RackTables::Schema::Result::Link",
156 { "foreign.portb" => "self.id" },
157 { cascade_copy => 0, cascade_delete => 0 },
158 );
159  
160 =head2 port_interface_compat
161  
162 Type: belongs_to
163  
164 Related object: L<RackTables::Schema::Result::PortInterfaceCompat>
165  
166 =cut
167  
168 1 __PACKAGE__->belongs_to(
169 "port_interface_compat",
170 "RackTables::Schema::Result::PortInterfaceCompat",
171 { iif_id => "iif_id", oif_id => "type" },
172 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
173 );
174  
175 =head2 object
176  
177 Type: belongs_to
178  
179 Related object: L<RackTables::Schema::Result::RackObject>
180  
181 =cut
182  
183 1 __PACKAGE__->belongs_to(
184 "object",
185 "RackTables::Schema::Result::RackObject",
186 { id => "object_id" },
187 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
188 );
189  
190  
191 # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02
192 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dUXf2aD8oyejV/l90kngSQ
193  
194  
195 # You can replace this text with custom code or comments, and it will be preserved on regeneration
196 1 __PACKAGE__->meta->make_immutable;
197 1 1;
« blib/lib/RackTables/Schema/Result/ObjectParentCompat.pm ↑ Summary blib/lib/RackTables/Schema/Result/PortAllowedVLAN.pm »