| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_20_7::Result::IPv4RS; | ||
| 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_7::Result::IPv4RS | ||
| 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<IPv4RS> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("IPv4RS"); | ||
| 35 | |||
| 36 | =head1 ACCESSORS | ||
| 37 | |||
| 38 | =head2 id | ||
| 39 | |||
| 40 | data_type: 'integer' | ||
| 41 | extra: {unsigned => 1} | ||
| 42 | is_auto_increment: 1 | ||
| 43 | is_nullable: 0 | ||
| 44 | |||
| 45 | =head2 inservice | ||
| 46 | |||
| 47 | data_type: 'enum' | ||
| 48 | default_value: 'no' | ||
| 49 | extra: {list => ["yes","no"]} | ||
| 50 | is_nullable: 0 | ||
| 51 | |||
| 52 | =head2 rsip | ||
| 53 | |||
| 54 | data_type: 'varbinary' | ||
| 55 | is_nullable: 0 | ||
| 56 | size: 16 | ||
| 57 | |||
| 58 | =head2 rsport | ||
| 59 | |||
| 60 | data_type: 'smallint' | ||
| 61 | extra: {unsigned => 1} | ||
| 62 | is_nullable: 1 | ||
| 63 | |||
| 64 | =head2 rspool_id | ||
| 65 | |||
| 66 | data_type: 'integer' | ||
| 67 | extra: {unsigned => 1} | ||
| 68 | is_foreign_key: 1 | ||
| 69 | is_nullable: 1 | ||
| 70 | |||
| 71 | =head2 rsconfig | ||
| 72 | |||
| 73 | data_type: 'text' | ||
| 74 | is_nullable: 1 | ||
| 75 | |||
| 76 | =head2 comment | ||
| 77 | |||
| 78 | data_type: 'varchar' | ||
| 79 | is_nullable: 1 | ||
| 80 | size: 255 | ||
| 81 | |||
| 82 | =cut | ||
| 83 | |||
| 84 | __PACKAGE__->add_columns( | ||
| 85 | "id", | ||
| 86 | { | ||
| 87 | data_type => "integer", | ||
| 88 | extra => { unsigned => 1 }, | ||
| 89 | is_auto_increment => 1, | ||
| 90 | is_nullable => 0, | ||
| 91 | }, | ||
| 92 | "inservice", | ||
| 93 | { | ||
| 94 | data_type => "enum", | ||
| 95 | default_value => "no", | ||
| 96 | extra => { list => ["yes", "no"] }, | ||
| 97 | is_nullable => 0, | ||
| 98 | }, | ||
| 99 | "rsip", | ||
| 100 | { data_type => "varbinary", is_nullable => 0, size => 16 }, | ||
| 101 | "rsport", | ||
| 102 | { data_type => "smallint", extra => { unsigned => 1 }, is_nullable => 1 }, | ||
| 103 | "rspool_id", | ||
| 104 | { | ||
| 105 | data_type => "integer", | ||
| 106 | extra => { unsigned => 1 }, | ||
| 107 | is_foreign_key => 1, | ||
| 108 | is_nullable => 1, | ||
| 109 | }, | ||
| 110 | "rsconfig", | ||
| 111 | { data_type => "text", is_nullable => 1 }, | ||
| 112 | "comment", | ||
| 113 | { data_type => "varchar", is_nullable => 1, size => 255 }, | ||
| 114 | ); | ||
| 115 | |||
| 116 | =head1 PRIMARY KEY | ||
| 117 | |||
| 118 | =over 4 | ||
| 119 | |||
| 120 | =item * L</id> | ||
| 121 | |||
| 122 | =back | ||
| 123 | |||
| 124 | =cut | ||
| 125 | |||
| 126 | __PACKAGE__->set_primary_key("id"); | ||
| 127 | |||
| 128 | =head1 UNIQUE CONSTRAINTS | ||
| 129 | |||
| 130 | =head2 C<pool-endpoint> | ||
| 131 | |||
| 132 | =over 4 | ||
| 133 | |||
| 134 | =item * L</rspool_id> | ||
| 135 | |||
| 136 | =item * L</rsip> | ||
| 137 | |||
| 138 | =item * L</rsport> | ||
| 139 | |||
| 140 | =back | ||
| 141 | |||
| 142 | =cut | ||
| 143 | |||
| 144 | __PACKAGE__->add_unique_constraint("pool-endpoint", ["rspool_id", "rsip", "rsport"]); | ||
| 145 | |||
| 146 | =head1 RELATIONS | ||
| 147 | |||
| 148 | =head2 rspool | ||
| 149 | |||
| 150 | Type: belongs_to | ||
| 151 | |||
| 152 | Related object: L<Schema::RackTables::0_20_7::Result::IPv4RSPool> | ||
| 153 | |||
| 154 | =cut | ||
| 155 | |||
| 156 | __PACKAGE__->belongs_to( | ||
| 157 | "rspool", | ||
| 158 | "Schema::RackTables::0_20_7::Result::IPv4RSPool", | ||
| 159 | { id => "rspool_id" }, | ||
| 160 | { | ||
| 161 | is_deferrable => 1, | ||
| 162 | join_type => "LEFT", | ||
| 163 | on_delete => "CASCADE", | ||
| 164 | on_update => "RESTRICT", | ||
| 165 | }, | ||
| 166 | ); | ||
| 167 | |||
| 168 | |||
| 169 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:01:14 | ||
| 170 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HiA1t+pKHouBnIWpjrt7Wg | ||
| 171 | |||
| 172 | |||
| 173 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 174 | 1; |