| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_17_4::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_4::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 type | ||
| 59 | |||
| 60 | data_type: 'integer' | ||
| 61 | extra: {unsigned => 1} | ||
| 62 | is_nullable: 0 | ||
| 63 | |||
| 64 | =head2 l2address | ||
| 65 | |||
| 66 | data_type: 'char' | ||
| 67 | is_nullable: 1 | ||
| 68 | size: 64 | ||
| 69 | |||
| 70 | =head2 reservation_comment | ||
| 71 | |||
| 72 | data_type: 'char' | ||
| 73 | is_nullable: 1 | ||
| 74 | size: 255 | ||
| 75 | |||
| 76 | =head2 label | ||
| 77 | |||
| 78 | data_type: 'char' | ||
| 79 | is_nullable: 1 | ||
| 80 | size: 255 | ||
| 81 | |||
| 82 | =cut | ||
| 83 | |||
| 84 | __PACKAGE__->add_columns( | ||
| 85 | "id", | ||
| 86 | { | ||
| 87 | data_type => "integer", | ||
| 88 | extra => { unsigned => 1 }, | ||
| 89 | is_auto_increment => 1, | ||
| 90 | is_nullable => 0, | ||
| 91 | }, | ||
| 92 | "object_id", | ||
| 93 | { | ||
| 94 | data_type => "integer", | ||
| 95 | extra => { unsigned => 1 }, | ||
| 96 | is_foreign_key => 1, | ||
| 97 | is_nullable => 0, | ||
| 98 | }, | ||
| 99 | "name", | ||
| 100 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 101 | "type", | ||
| 102 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 }, | ||
| 103 | "l2address", | ||
| 104 | { data_type => "char", is_nullable => 1, size => 64 }, | ||
| 105 | "reservation_comment", | ||
| 106 | { data_type => "char", is_nullable => 1, size => 255 }, | ||
| 107 | "label", | ||
| 108 | { data_type => "char", is_nullable => 1, size => 255 }, | ||
| 109 | ); | ||
| 110 | |||
| 111 | =head1 PRIMARY KEY | ||
| 112 | |||
| 113 | =over 4 | ||
| 114 | |||
| 115 | =item * L</id> | ||
| 116 | |||
| 117 | =back | ||
| 118 | |||
| 119 | =cut | ||
| 120 | |||
| 121 | __PACKAGE__->set_primary_key("id"); | ||
| 122 | |||
| 123 | =head1 UNIQUE CONSTRAINTS | ||
| 124 | |||
| 125 | =head2 C<per_object> | ||
| 126 | |||
| 127 | =over 4 | ||
| 128 | |||
| 129 | =item * L</object_id> | ||
| 130 | |||
| 131 | =item * L</name> | ||
| 132 | |||
| 133 | =item * L</type> | ||
| 134 | |||
| 135 | =back | ||
| 136 | |||
| 137 | =cut | ||
| 138 | |||
| 139 | __PACKAGE__->add_unique_constraint("per_object", ["object_id", "name", "type"]); | ||
| 140 | |||
| 141 | =head1 RELATIONS | ||
| 142 | |||
| 143 | =head2 link_porta | ||
| 144 | |||
| 145 | Type: might_have | ||
| 146 | |||
| 147 | Related object: L<Schema::RackTables::0_17_4::Result::Link> | ||
| 148 | |||
| 149 | =cut | ||
| 150 | |||
| 151 | __PACKAGE__->might_have( | ||
| 152 | "link_porta", | ||
| 153 | "Schema::RackTables::0_17_4::Result::Link", | ||
| 154 | { "foreign.porta" => "self.id" }, | ||
| 155 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 156 | ); | ||
| 157 | |||
| 158 | =head2 link_portb | ||
| 159 | |||
| 160 | Type: might_have | ||
| 161 | |||
| 162 | Related object: L<Schema::RackTables::0_17_4::Result::Link> | ||
| 163 | |||
| 164 | =cut | ||
| 165 | |||
| 166 | __PACKAGE__->might_have( | ||
| 167 | "link_portb", | ||
| 168 | "Schema::RackTables::0_17_4::Result::Link", | ||
| 169 | { "foreign.portb" => "self.id" }, | ||
| 170 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 171 | ); | ||
| 172 | |||
| 173 | =head2 object | ||
| 174 | |||
| 175 | Type: belongs_to | ||
| 176 | |||
| 177 | Related object: L<Schema::RackTables::0_17_4::Result::RackObject> | ||
| 178 | |||
| 179 | =cut | ||
| 180 | |||
| 181 | __PACKAGE__->belongs_to( | ||
| 182 | "object", | ||
| 183 | "Schema::RackTables::0_17_4::Result::RackObject", | ||
| 184 | { id => "object_id" }, | ||
| 185 | { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, | ||
| 186 | ); | ||
| 187 | |||
| 188 | |||
| 189 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:04:11 | ||
| 190 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dodFMaCwC4US4FlHHmhocA | ||
| 191 | |||
| 192 | |||
| 193 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 194 | 1; |