| 1 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Schema::RackTables::0_20_11::Result::PortVLANMode; | ||
| 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_11::Result::PortVLANMode | ||
| 10 | |||
| 11 | =cut | ||
| 12 | |||
| 13 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 2 | ▶ | use base 'DBIx::Class::Core'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 2 | __PACKAGE__->load_components("InflateColumn::DateTime"); | |
| 29 | |||
| 30 | =head1 TABLE: C<PortVLANMode> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | 2 | __PACKAGE__->table("PortVLANMode"); | |
| 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_mode | ||
| 53 | |||
| 54 | data_type: 'enum' | ||
| 55 | default_value: 'access' | ||
| 56 | extra: {list => ["access","trunk"]} | ||
| 57 | is_nullable: 0 | ||
| 58 | |||
| 59 | =cut | ||
| 60 | |||
| 61 | 2 | __PACKAGE__->add_columns( | |
| 62 | "object_id", | ||
| 63 | { | ||
| 64 | data_type => "integer", | ||
| 65 | extra => { unsigned => 1 }, | ||
| 66 | is_foreign_key => 1, | ||
| 67 | is_nullable => 0, | ||
| 68 | }, | ||
| 69 | "port_name", | ||
| 70 | { data_type => "char", is_foreign_key => 1, is_nullable => 0, size => 255 }, | ||
| 71 | "vlan_mode", | ||
| 72 | { | ||
| 73 | data_type => "enum", | ||
| 74 | default_value => "access", | ||
| 75 | extra => { list => ["access", "trunk"] }, | ||
| 76 | is_nullable => 0, | ||
| 77 | }, | ||
| 78 | ); | ||
| 79 | |||
| 80 | =head1 PRIMARY KEY | ||
| 81 | |||
| 82 | =over 4 | ||
| 83 | |||
| 84 | =item * L</object_id> | ||
| 85 | |||
| 86 | =item * L</port_name> | ||
| 87 | |||
| 88 | =back | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | 2 | __PACKAGE__->set_primary_key("object_id", "port_name"); | |
| 93 | |||
| 94 | =head1 RELATIONS | ||
| 95 | |||
| 96 | =head2 cached_pvm | ||
| 97 | |||
| 98 | Type: belongs_to | ||
| 99 | |||
| 100 | Related object: L<Schema::RackTables::0_20_11::Result::CachedPVM> | ||
| 101 | |||
| 102 | =cut | ||
| 103 | |||
| 104 | 2 | __PACKAGE__->belongs_to( | |
| 105 | "cached_pvm", | ||
| 106 | "Schema::RackTables::0_20_11::Result::CachedPVM", | ||
| 107 | { object_id => "object_id", port_name => "port_name" }, | ||
| 108 | { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, | ||
| 109 | ); | ||
| 110 | |||
| 111 | =head2 port_allowed_vlans | ||
| 112 | |||
| 113 | Type: has_many | ||
| 114 | |||
| 115 | Related object: L<Schema::RackTables::0_20_11::Result::PortAllowedVLAN> | ||
| 116 | |||
| 117 | =cut | ||
| 118 | |||
| 119 | 2 | __PACKAGE__->has_many( | |
| 120 | "port_allowed_vlans", | ||
| 121 | "Schema::RackTables::0_20_11::Result::PortAllowedVLAN", | ||
| 122 | { | ||
| 123 | "foreign.object_id" => "self.object_id", | ||
| 124 | "foreign.port_name" => "self.port_name", | ||
| 125 | }, | ||
| 126 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 127 | ); | ||
| 128 | |||
| 129 | =head2 vlans | ||
| 130 | |||
| 131 | Type: many_to_many | ||
| 132 | |||
| 133 | Composing rels: L</port_allowed_vlans> -> vlan | ||
| 134 | |||
| 135 | =cut | ||
| 136 | |||
| 137 | 2 | __PACKAGE__->many_to_many("vlans", "port_allowed_vlans", "vlan"); | |
| 138 | |||
| 139 | |||
| 140 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2016-05-12 22:07:10 | ||
| 141 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VVc2lN6Y+yLvB7Nz2E3gTA | ||
| 142 | |||
| 143 | |||
| 144 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 145 | 2 | 1; | |