| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_19_11::Result::CachedPVM; | ||
| 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_19_11::Result::CachedPVM | ||
| 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<CachedPVM> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("CachedPVM"); | ||
| 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_nullable: 0 | ||
| 49 | size: 255 | ||
| 50 | |||
| 51 | =head2 vlan_mode | ||
| 52 | |||
| 53 | data_type: 'enum' | ||
| 54 | default_value: 'access' | ||
| 55 | extra: {list => ["access","trunk"]} | ||
| 56 | is_nullable: 0 | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | __PACKAGE__->add_columns( | ||
| 61 | "object_id", | ||
| 62 | { | ||
| 63 | data_type => "integer", | ||
| 64 | extra => { unsigned => 1 }, | ||
| 65 | is_foreign_key => 1, | ||
| 66 | is_nullable => 0, | ||
| 67 | }, | ||
| 68 | "port_name", | ||
| 69 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 70 | "vlan_mode", | ||
| 71 | { | ||
| 72 | data_type => "enum", | ||
| 73 | default_value => "access", | ||
| 74 | extra => { list => ["access", "trunk"] }, | ||
| 75 | is_nullable => 0, | ||
| 76 | }, | ||
| 77 | ); | ||
| 78 | |||
| 79 | =head1 PRIMARY KEY | ||
| 80 | |||
| 81 | =over 4 | ||
| 82 | |||
| 83 | =item * L</object_id> | ||
| 84 | |||
| 85 | =item * L</port_name> | ||
| 86 | |||
| 87 | =back | ||
| 88 | |||
| 89 | =cut | ||
| 90 | |||
| 91 | __PACKAGE__->set_primary_key("object_id", "port_name"); | ||
| 92 | |||
| 93 | =head1 RELATIONS | ||
| 94 | |||
| 95 | =head2 cached_pavs | ||
| 96 | |||
| 97 | Type: has_many | ||
| 98 | |||
| 99 | Related object: L<Schema::RackTables::0_19_11::Result::CachedPAV> | ||
| 100 | |||
| 101 | =cut | ||
| 102 | |||
| 103 | __PACKAGE__->has_many( | ||
| 104 | "cached_pavs", | ||
| 105 | "Schema::RackTables::0_19_11::Result::CachedPAV", | ||
| 106 | { | ||
| 107 | "foreign.object_id" => "self.object_id", | ||
| 108 | "foreign.port_name" => "self.port_name", | ||
| 109 | }, | ||
| 110 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 111 | ); | ||
| 112 | |||
| 113 | =head2 object | ||
| 114 | |||
| 115 | Type: belongs_to | ||
| 116 | |||
| 117 | Related object: L<Schema::RackTables::0_19_11::Result::RackObject> | ||
| 118 | |||
| 119 | =cut | ||
| 120 | |||
| 121 | __PACKAGE__->belongs_to( | ||
| 122 | "object", | ||
| 123 | "Schema::RackTables::0_19_11::Result::RackObject", | ||
| 124 | { id => "object_id" }, | ||
| 125 | { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, | ||
| 126 | ); | ||
| 127 | |||
| 128 | =head2 port_vlanmode | ||
| 129 | |||
| 130 | Type: might_have | ||
| 131 | |||
| 132 | Related object: L<Schema::RackTables::0_19_11::Result::PortVLANMode> | ||
| 133 | |||
| 134 | =cut | ||
| 135 | |||
| 136 | __PACKAGE__->might_have( | ||
| 137 | "port_vlanmode", | ||
| 138 | "Schema::RackTables::0_19_11::Result::PortVLANMode", | ||
| 139 | { | ||
| 140 | "foreign.object_id" => "self.object_id", | ||
| 141 | "foreign.port_name" => "self.port_name", | ||
| 142 | }, | ||
| 143 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 144 | ); | ||
| 145 | |||
| 146 | =head2 vlans | ||
| 147 | |||
| 148 | Type: many_to_many | ||
| 149 | |||
| 150 | Composing rels: L</cached_pavs> -> vlan | ||
| 151 | |||
| 152 | =cut | ||
| 153 | |||
| 154 | __PACKAGE__->many_to_many("vlans", "cached_pavs", "vlan"); | ||
| 155 | |||
| 156 | |||
| 157 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:02:48 | ||
| 158 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:igF3qw/DmszyJc88eTIoGQ | ||
| 159 | |||
| 160 | |||
| 161 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 162 | 1; |