« blib/lib/RackTables/Schema/Result/CachedPNV.pm
↑ Summary
blib/lib/RackTables/Schema/Result/CactiGraph.pm »
| 1 | package RackTables::Schema::Result::CachedPVM; | ||
| 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::CachedPVM | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | 1 | __PACKAGE__->table("CachedPVM"); | |
| 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_nullable: 0 | ||
| 36 | size: 255 | ||
| 37 | |||
| 38 | =head2 vlan_mode | ||
| 39 | |||
| 40 | data_type: 'enum' | ||
| 41 | default_value: 'access' | ||
| 42 | extra: {list => ["access","trunk"]} | ||
| 43 | is_nullable: 0 | ||
| 44 | |||
| 45 | =cut | ||
| 46 | |||
| 47 | 1 | __PACKAGE__->add_columns( | |
| 48 | "object_id", | ||
| 49 | { | ||
| 50 | data_type => "integer", | ||
| 51 | extra => { unsigned => 1 }, | ||
| 52 | is_foreign_key => 1, | ||
| 53 | is_nullable => 0, | ||
| 54 | }, | ||
| 55 | "port_name", | ||
| 56 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 57 | "vlan_mode", | ||
| 58 | { | ||
| 59 | data_type => "enum", | ||
| 60 | default_value => "access", | ||
| 61 | extra => { list => ["access", "trunk"] }, | ||
| 62 | is_nullable => 0, | ||
| 63 | }, | ||
| 64 | ); | ||
| 65 | 1 | __PACKAGE__->set_primary_key("object_id", "port_name"); | |
| 66 | |||
| 67 | =head1 RELATIONS | ||
| 68 | |||
| 69 | =head2 cached_pavs | ||
| 70 | |||
| 71 | Type: has_many | ||
| 72 | |||
| 73 | Related object: L<RackTables::Schema::Result::CachedPAV> | ||
| 74 | |||
| 75 | =cut | ||
| 76 | |||
| 77 | 1 | __PACKAGE__->has_many( | |
| 78 | "cached_pavs", | ||
| 79 | "RackTables::Schema::Result::CachedPAV", | ||
| 80 | { | ||
| 81 | "foreign.object_id" => "self.object_id", | ||
| 82 | "foreign.port_name" => "self.port_name", | ||
| 83 | }, | ||
| 84 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 85 | ); | ||
| 86 | |||
| 87 | =head2 object | ||
| 88 | |||
| 89 | Type: belongs_to | ||
| 90 | |||
| 91 | Related object: L<RackTables::Schema::Result::RackObject> | ||
| 92 | |||
| 93 | =cut | ||
| 94 | |||
| 95 | 1 | __PACKAGE__->belongs_to( | |
| 96 | "object", | ||
| 97 | "RackTables::Schema::Result::RackObject", | ||
| 98 | { id => "object_id" }, | ||
| 99 | { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, | ||
| 100 | ); | ||
| 101 | |||
| 102 | =head2 port_vlanmode | ||
| 103 | |||
| 104 | Type: might_have | ||
| 105 | |||
| 106 | Related object: L<RackTables::Schema::Result::PortVLANMode> | ||
| 107 | |||
| 108 | =cut | ||
| 109 | |||
| 110 | 1 | __PACKAGE__->might_have( | |
| 111 | "port_vlanmode", | ||
| 112 | "RackTables::Schema::Result::PortVLANMode", | ||
| 113 | { | ||
| 114 | "foreign.object_id" => "self.object_id", | ||
| 115 | "foreign.port_name" => "self.port_name", | ||
| 116 | }, | ||
| 117 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 118 | ); | ||
| 119 | |||
| 120 | |||
| 121 | # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02 | ||
| 122 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PpPCh1ckEv1NO1piCEYl8A | ||
| 123 | |||
| 124 | |||
| 125 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 126 | 1 | __PACKAGE__->meta->make_immutable; | |
| 127 | 1 | 1; | |