| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_19_1::Result::AttributeValue; | ||
| 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_19_1::Result::AttributeValue | ||
| 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<AttributeValue> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("AttributeValue"); | ||
| 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: 1 | ||
| 44 | |||
| 45 | =head2 attr_id | ||
| 46 | |||
| 47 | data_type: 'integer' | ||
| 48 | extra: {unsigned => 1} | ||
| 49 | is_nullable: 1 | ||
| 50 | |||
| 51 | =head2 string_value | ||
| 52 | |||
| 53 | data_type: 'char' | ||
| 54 | is_nullable: 1 | ||
| 55 | size: 128 | ||
| 56 | |||
| 57 | =head2 uint_value | ||
| 58 | |||
| 59 | data_type: 'integer' | ||
| 60 | extra: {unsigned => 1} | ||
| 61 | is_nullable: 1 | ||
| 62 | |||
| 63 | =head2 float_value | ||
| 64 | |||
| 65 | data_type: 'float' | ||
| 66 | is_nullable: 1 | ||
| 67 | |||
| 68 | =cut | ||
| 69 | |||
| 70 | __PACKAGE__->add_columns( | ||
| 71 | "object_id", | ||
| 72 | { | ||
| 73 | data_type => "integer", | ||
| 74 | extra => { unsigned => 1 }, | ||
| 75 | is_foreign_key => 1, | ||
| 76 | is_nullable => 1, | ||
| 77 | }, | ||
| 78 | "attr_id", | ||
| 79 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 }, | ||
| 80 | "string_value", | ||
| 81 | { data_type => "char", is_nullable => 1, size => 128 }, | ||
| 82 | "uint_value", | ||
| 83 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 }, | ||
| 84 | "float_value", | ||
| 85 | { data_type => "float", is_nullable => 1 }, | ||
| 86 | ); | ||
| 87 | |||
| 88 | =head1 UNIQUE CONSTRAINTS | ||
| 89 | |||
| 90 | =head2 C<object_id> | ||
| 91 | |||
| 92 | =over 4 | ||
| 93 | |||
| 94 | =item * L</object_id> | ||
| 95 | |||
| 96 | =item * L</attr_id> | ||
| 97 | |||
| 98 | =back | ||
| 99 | |||
| 100 | =cut | ||
| 101 | |||
| 102 | __PACKAGE__->add_unique_constraint("object_id", ["object_id", "attr_id"]); | ||
| 103 | |||
| 104 | =head1 RELATIONS | ||
| 105 | |||
| 106 | =head2 object | ||
| 107 | |||
| 108 | Type: belongs_to | ||
| 109 | |||
| 110 | Related object: L<Schema::RackTables::0_19_1::Result::RackObject> | ||
| 111 | |||
| 112 | =cut | ||
| 113 | |||
| 114 | __PACKAGE__->belongs_to( | ||
| 115 | "object", | ||
| 116 | "Schema::RackTables::0_19_1::Result::RackObject", | ||
| 117 | { id => "object_id" }, | ||
| 118 | { | ||
| 119 | is_deferrable => 1, | ||
| 120 | join_type => "LEFT", | ||
| 121 | on_delete => "CASCADE", | ||
| 122 | on_update => "RESTRICT", | ||
| 123 | }, | ||
| 124 | ); | ||
| 125 | |||
| 126 | |||
| 127 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:02:57 | ||
| 128 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ROuvg/eemQGtjHZIXWtyrg | ||
| 129 | |||
| 130 | |||
| 131 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 132 | 1; |