| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_17_5::Result::Port; | ||
| 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_17_5::Result::Port | ||
| 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<Port> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("Port"); | ||
| 35 | |||
| 36 | =head1 ACCESSORS | ||
| 37 | |||
| 38 | =head2 id | ||
| 39 | |||
| 40 | data_type: 'integer' | ||
| 41 | extra: {unsigned => 1} | ||
| 42 | is_auto_increment: 1 | ||
| 43 | is_nullable: 0 | ||
| 44 | |||
| 45 | =head2 object_id | ||
| 46 | |||
| 47 | data_type: 'integer' | ||
| 48 | extra: {unsigned => 1} | ||
| 49 | is_foreign_key: 1 | ||
| 50 | is_nullable: 0 | ||
| 51 | |||
| 52 | =head2 name | ||
| 53 | |||
| 54 | data_type: 'char' | ||
| 55 | is_nullable: 0 | ||
| 56 | size: 255 | ||
| 57 | |||
| 58 | =head2 iif_id | ||
| 59 | |||
| 60 | data_type: 'integer' | ||
| 61 | extra: {unsigned => 1} | ||
| 62 | is_foreign_key: 1 | ||
| 63 | is_nullable: 0 | ||
| 64 | |||
| 65 | =head2 type | ||
| 66 | |||
| 67 | data_type: 'integer' | ||
| 68 | extra: {unsigned => 1} | ||
| 69 | is_foreign_key: 1 | ||
| 70 | is_nullable: 0 | ||
| 71 | |||
| 72 | =head2 l2address | ||
| 73 | |||
| 74 | data_type: 'char' | ||
| 75 | is_nullable: 1 | ||
| 76 | size: 64 | ||
| 77 | |||
| 78 | =head2 reservation_comment | ||
| 79 | |||
| 80 | data_type: 'char' | ||
| 81 | is_nullable: 1 | ||
| 82 | size: 255 | ||
| 83 | |||
| 84 | =head2 label | ||
| 85 | |||
| 86 | data_type: 'char' | ||
| 87 | is_nullable: 1 | ||
| 88 | size: 255 | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | __PACKAGE__->add_columns( | ||
| 93 | "id", | ||
| 94 | { | ||
| 95 | data_type => "integer", | ||
| 96 | extra => { unsigned => 1 }, | ||
| 97 | is_auto_increment => 1, | ||
| 98 | is_nullable => 0, | ||
| 99 | }, | ||
| 100 | "object_id", | ||
| 101 | { | ||
| 102 | data_type => "integer", | ||
| 103 | extra => { unsigned => 1 }, | ||
| 104 | is_foreign_key => 1, | ||
| 105 | is_nullable => 0, | ||
| 106 | }, | ||
| 107 | "name", | ||
| 108 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 109 | "iif_id", | ||
| 110 | { | ||
| 111 | data_type => "integer", | ||
| 112 | extra => { unsigned => 1 }, | ||
| 113 | is_foreign_key => 1, | ||
| 114 | is_nullable => 0, | ||
| 115 | }, | ||
| 116 | "type", | ||
| 117 | { | ||
| 118 | data_type => "integer", | ||
| 119 | extra => { unsigned => 1 }, | ||
| 120 | is_foreign_key => 1, | ||
| 121 | is_nullable => 0, | ||
| 122 | }, | ||
| 123 | "l2address", | ||
| 124 | { data_type => "char", is_nullable => 1, size => 64 }, | ||
| 125 | "reservation_comment", | ||
| 126 | { data_type => "char", is_nullable => 1, size => 255 }, | ||
| 127 | "label", | ||
| 128 | { data_type => "char", is_nullable => 1, size => 255 }, | ||
| 129 | ); | ||
| 130 | |||
| 131 | =head1 PRIMARY KEY | ||
| 132 | |||
| 133 | =over 4 | ||
| 134 | |||
| 135 | =item * L</id> | ||
| 136 | |||
| 137 | =back | ||
| 138 | |||
| 139 | =cut | ||
| 140 | |||
| 141 | __PACKAGE__->set_primary_key("id"); | ||
| 142 | |||
| 143 | =head1 UNIQUE CONSTRAINTS | ||
| 144 | |||
| 145 | =head2 C<object_iif_oif_name> | ||
| 146 | |||
| 147 | =over 4 | ||
| 148 | |||
| 149 | =item * L</object_id> | ||
| 150 | |||
| 151 | =item * L</iif_id> | ||
| 152 | |||
| 153 | =item * L</type> | ||
| 154 | |||
| 155 | =item * L</name> | ||
| 156 | |||
| 157 | =back | ||
| 158 | |||
| 159 | =cut | ||
| 160 | |||
| 161 | __PACKAGE__->add_unique_constraint( | ||
| 162 | "object_iif_oif_name", | ||
| 163 | ["object_id", "iif_id", "type", "name"], | ||
| 164 | ); | ||
| 165 | |||
| 166 | =head1 RELATIONS | ||
| 167 | |||
| 168 | =head2 link_porta | ||
| 169 | |||
| 170 | Type: might_have | ||
| 171 | |||
| 172 | Related object: L<Schema::RackTables::0_17_5::Result::Link> | ||
| 173 | |||
| 174 | =cut | ||
| 175 | |||
| 176 | __PACKAGE__->might_have( | ||
| 177 | "link_porta", | ||
| 178 | "Schema::RackTables::0_17_5::Result::Link", | ||
| 179 | { "foreign.porta" => "self.id" }, | ||
| 180 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 181 | ); | ||
| 182 | |||
| 183 | =head2 link_portb | ||
| 184 | |||
| 185 | Type: might_have | ||
| 186 | |||
| 187 | Related object: L<Schema::RackTables::0_17_5::Result::Link> | ||
| 188 | |||
| 189 | =cut | ||
| 190 | |||
| 191 | __PACKAGE__->might_have( | ||
| 192 | "link_portb", | ||
| 193 | "Schema::RackTables::0_17_5::Result::Link", | ||
| 194 | { "foreign.portb" => "self.id" }, | ||
| 195 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 196 | ); | ||
| 197 | |||
| 198 | =head2 object | ||
| 199 | |||
| 200 | Type: belongs_to | ||
| 201 | |||
| 202 | Related object: L<Schema::RackTables::0_17_5::Result::RackObject> | ||
| 203 | |||
| 204 | =cut | ||
| 205 | |||
| 206 | __PACKAGE__->belongs_to( | ||
| 207 | "object", | ||
| 208 | "Schema::RackTables::0_17_5::Result::RackObject", | ||
| 209 | { id => "object_id" }, | ||
| 210 | { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, | ||
| 211 | ); | ||
| 212 | |||
| 213 | =head2 port_interface_compat | ||
| 214 | |||
| 215 | Type: belongs_to | ||
| 216 | |||
| 217 | Related object: L<Schema::RackTables::0_17_5::Result::PortInterfaceCompat> | ||
| 218 | |||
| 219 | =cut | ||
| 220 | |||
| 221 | __PACKAGE__->belongs_to( | ||
| 222 | "port_interface_compat", | ||
| 223 | "Schema::RackTables::0_17_5::Result::PortInterfaceCompat", | ||
| 224 | { iif_id => "iif_id", oif_id => "type" }, | ||
| 225 | { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, | ||
| 226 | ); | ||
| 227 | |||
| 228 | |||
| 229 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:04:07 | ||
| 230 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oNLS3rItBokSaS+fTXGYZw | ||
| 231 | |||
| 232 | |||
| 233 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 234 | 1; |