| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_20_5::Result::CachedPNV; | ||
| 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_20_5::Result::CachedPNV | ||
| 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<CachedPNV> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("CachedPNV"); | ||
| 35 | |||
| 36 | =head1 ACCESSORS | ||
| 37 | |||
| 38 | =head2 object_id | ||
| 39 | |||
| 40 | data_type: 'integer' | ||
| 41 | extra: {unsigned => 1} | ||
| 42 | is_foreign_key: 1 | ||
| 43 | is_nullable: 0 | ||
| 44 | |||
| 45 | =head2 port_name | ||
| 46 | |||
| 47 | data_type: 'char' | ||
| 48 | is_foreign_key: 1 | ||
| 49 | is_nullable: 0 | ||
| 50 | size: 255 | ||
| 51 | |||
| 52 | =head2 vlan_id | ||
| 53 | |||
| 54 | data_type: 'integer' | ||
| 55 | default_value: 0 | ||
| 56 | extra: {unsigned => 1} | ||
| 57 | is_foreign_key: 1 | ||
| 58 | is_nullable: 0 | ||
| 59 | |||
| 60 | =cut | ||
| 61 | |||
| 62 | __PACKAGE__->add_columns( | ||
| 63 | "object_id", | ||
| 64 | { | ||
| 65 | data_type => "integer", | ||
| 66 | extra => { unsigned => 1 }, | ||
| 67 | is_foreign_key => 1, | ||
| 68 | is_nullable => 0, | ||
| 69 | }, | ||
| 70 | "port_name", | ||
| 71 | { data_type => "char", is_foreign_key => 1, is_nullable => 0, size => 255 }, | ||
| 72 | "vlan_id", | ||
| 73 | { | ||
| 74 | data_type => "integer", | ||
| 75 | default_value => 0, | ||
| 76 | extra => { unsigned => 1 }, | ||
| 77 | is_foreign_key => 1, | ||
| 78 | is_nullable => 0, | ||
| 79 | }, | ||
| 80 | ); | ||
| 81 | |||
| 82 | =head1 PRIMARY KEY | ||
| 83 | |||
| 84 | =over 4 | ||
| 85 | |||
| 86 | =item * L</object_id> | ||
| 87 | |||
| 88 | =item * L</port_name> | ||
| 89 | |||
| 90 | =item * L</vlan_id> | ||
| 91 | |||
| 92 | =back | ||
| 93 | |||
| 94 | =cut | ||
| 95 | |||
| 96 | __PACKAGE__->set_primary_key("object_id", "port_name", "vlan_id"); | ||
| 97 | |||
| 98 | =head1 UNIQUE CONSTRAINTS | ||
| 99 | |||
| 100 | =head2 C<port_id> | ||
| 101 | |||
| 102 | =over 4 | ||
| 103 | |||
| 104 | =item * L</object_id> | ||
| 105 | |||
| 106 | =item * L</port_name> | ||
| 107 | |||
| 108 | =back | ||
| 109 | |||
| 110 | =cut | ||
| 111 | |||
| 112 | __PACKAGE__->add_unique_constraint("port_id", ["object_id", "port_name"]); | ||
| 113 | |||
| 114 | =head1 RELATIONS | ||
| 115 | |||
| 116 | =head2 cached_pav | ||
| 117 | |||
| 118 | Type: belongs_to | ||
| 119 | |||
| 120 | Related object: L<Schema::RackTables::0_20_5::Result::CachedPAV> | ||
| 121 | |||
| 122 | =cut | ||
| 123 | |||
| 124 | __PACKAGE__->belongs_to( | ||
| 125 | "cached_pav", | ||
| 126 | "Schema::RackTables::0_20_5::Result::CachedPAV", | ||
| 127 | { | ||
| 128 | object_id => "object_id", | ||
| 129 | port_name => "port_name", | ||
| 130 | vlan_id => "vlan_id", | ||
| 131 | }, | ||
| 132 | { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, | ||
| 133 | ); | ||
| 134 | |||
| 135 | |||
| 136 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:01:25 | ||
| 137 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:52qjlEaLdEleqterKIzm2Q | ||
| 138 | |||
| 139 | |||
| 140 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 141 | 1; |