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