« blib/lib/RackTables/Schema/Result/PortNativeVLAN.pm
↑ Summary
blib/lib/RackTables/Schema/Result/Rack.pm »
| 1 | package RackTables::Schema::Result::PortVLANMode; | ||
| 2 | |||
| 3 | # Created by DBIx::Class::Schema::Loader | ||
| 4 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
| 5 | |||
| 6 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use MooseX::NonMoose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | extends 'DBIx::Class::Core'; | |
| 13 | |||
| 14 | |||
| 15 | =head1 NAME | ||
| 16 | |||
| 17 | RackTables::Schema::Result::PortVLANMode | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | 1 | __PACKAGE__->table("PortVLANMode"); | |
| 22 | |||
| 23 | =head1 ACCESSORS | ||
| 24 | |||
| 25 | =head2 object_id | ||
| 26 | |||
| 27 | data_type: 'integer' | ||
| 28 | extra: {unsigned => 1} | ||
| 29 | is_foreign_key: 1 | ||
| 30 | is_nullable: 0 | ||
| 31 | |||
| 32 | =head2 port_name | ||
| 33 | |||
| 34 | data_type: 'char' | ||
| 35 | is_foreign_key: 1 | ||
| 36 | is_nullable: 0 | ||
| 37 | size: 255 | ||
| 38 | |||
| 39 | =head2 vlan_mode | ||
| 40 | |||
| 41 | data_type: 'enum' | ||
| 42 | default_value: 'access' | ||
| 43 | extra: {list => ["access","trunk"]} | ||
| 44 | is_nullable: 0 | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | 1 | __PACKAGE__->add_columns( | |
| 49 | "object_id", | ||
| 50 | { | ||
| 51 | data_type => "integer", | ||
| 52 | extra => { unsigned => 1 }, | ||
| 53 | is_foreign_key => 1, | ||
| 54 | is_nullable => 0, | ||
| 55 | }, | ||
| 56 | "port_name", | ||
| 57 | { data_type => "char", is_foreign_key => 1, is_nullable => 0, size => 255 }, | ||
| 58 | "vlan_mode", | ||
| 59 | { | ||
| 60 | data_type => "enum", | ||
| 61 | default_value => "access", | ||
| 62 | extra => { list => ["access", "trunk"] }, | ||
| 63 | is_nullable => 0, | ||
| 64 | }, | ||
| 65 | ); | ||
| 66 | 1 | __PACKAGE__->set_primary_key("object_id", "port_name"); | |
| 67 | |||
| 68 | =head1 RELATIONS | ||
| 69 | |||
| 70 | =head2 port_allowed_vlans | ||
| 71 | |||
| 72 | Type: has_many | ||
| 73 | |||
| 74 | Related object: L<RackTables::Schema::Result::PortAllowedVLAN> | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||
| 78 | 1 | __PACKAGE__->has_many( | |
| 79 | "port_allowed_vlans", | ||
| 80 | "RackTables::Schema::Result::PortAllowedVLAN", | ||
| 81 | { | ||
| 82 | "foreign.object_id" => "self.object_id", | ||
| 83 | "foreign.port_name" => "self.port_name", | ||
| 84 | }, | ||
| 85 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 86 | ); | ||
| 87 | |||
| 88 | =head2 cached_pvm | ||
| 89 | |||
| 90 | Type: belongs_to | ||
| 91 | |||
| 92 | Related object: L<RackTables::Schema::Result::CachedPVM> | ||
| 93 | |||
| 94 | =cut | ||
| 95 | |||
| 96 | 1 | __PACKAGE__->belongs_to( | |
| 97 | "cached_pvm", | ||
| 98 | "RackTables::Schema::Result::CachedPVM", | ||
| 99 | { object_id => "object_id", port_name => "port_name" }, | ||
| 100 | { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, | ||
| 101 | ); | ||
| 102 | |||
| 103 | |||
| 104 | # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02 | ||
| 105 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NlkmUOi3N4WwyOWxXSMDwA | ||
| 106 | |||
| 107 | |||
| 108 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 109 | 1 | __PACKAGE__->meta->make_immutable; | |
| 110 | 1 | 1; | |