« blib/lib/RackTables/Schema/Result/AttributeMap.pm
↑ Summary
blib/lib/RackTables/Schema/Result/CachedPAV.pm »
| 1 | package RackTables::Schema::Result::AttributeValue; | ||
| 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::AttributeValue | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | 1 | __PACKAGE__->table("AttributeValue"); | |
| 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: 1 | ||
| 31 | |||
| 32 | =head2 attr_id | ||
| 33 | |||
| 34 | data_type: 'integer' | ||
| 35 | extra: {unsigned => 1} | ||
| 36 | is_foreign_key: 1 | ||
| 37 | is_nullable: 1 | ||
| 38 | |||
| 39 | =head2 string_value | ||
| 40 | |||
| 41 | data_type: 'char' | ||
| 42 | is_nullable: 1 | ||
| 43 | size: 255 | ||
| 44 | |||
| 45 | =head2 uint_value | ||
| 46 | |||
| 47 | data_type: 'integer' | ||
| 48 | extra: {unsigned => 1} | ||
| 49 | is_nullable: 1 | ||
| 50 | |||
| 51 | =head2 float_value | ||
| 52 | |||
| 53 | data_type: 'float' | ||
| 54 | is_nullable: 1 | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | 1 | __PACKAGE__->add_columns( | |
| 59 | "object_id", | ||
| 60 | { | ||
| 61 | data_type => "integer", | ||
| 62 | extra => { unsigned => 1 }, | ||
| 63 | is_foreign_key => 1, | ||
| 64 | is_nullable => 1, | ||
| 65 | }, | ||
| 66 | "attr_id", | ||
| 67 | { | ||
| 68 | data_type => "integer", | ||
| 69 | extra => { unsigned => 1 }, | ||
| 70 | is_foreign_key => 1, | ||
| 71 | is_nullable => 1, | ||
| 72 | }, | ||
| 73 | "string_value", | ||
| 74 | { data_type => "char", is_nullable => 1, size => 255 }, | ||
| 75 | "uint_value", | ||
| 76 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 }, | ||
| 77 | "float_value", | ||
| 78 | { data_type => "float", is_nullable => 1 }, | ||
| 79 | ); | ||
| 80 | 1 | __PACKAGE__->add_unique_constraint("object_id", ["object_id", "attr_id"]); | |
| 81 | |||
| 82 | =head1 RELATIONS | ||
| 83 | |||
| 84 | =head2 attr | ||
| 85 | |||
| 86 | Type: belongs_to | ||
| 87 | |||
| 88 | Related object: L<RackTables::Schema::Result::AttributeMap> | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | 1 | __PACKAGE__->belongs_to( | |
| 93 | "attr", | ||
| 94 | "RackTables::Schema::Result::AttributeMap", | ||
| 95 | { attr_id => "attr_id" }, | ||
| 96 | { | ||
| 97 | is_deferrable => 1, | ||
| 98 | join_type => "LEFT", | ||
| 99 | on_delete => "CASCADE", | ||
| 100 | on_update => "CASCADE", | ||
| 101 | }, | ||
| 102 | ); | ||
| 103 | |||
| 104 | =head2 object | ||
| 105 | |||
| 106 | Type: belongs_to | ||
| 107 | |||
| 108 | Related object: L<RackTables::Schema::Result::RackObject> | ||
| 109 | |||
| 110 | =cut | ||
| 111 | |||
| 112 | 1 | __PACKAGE__->belongs_to( | |
| 113 | "object", | ||
| 114 | "RackTables::Schema::Result::RackObject", | ||
| 115 | { id => "object_id" }, | ||
| 116 | { | ||
| 117 | is_deferrable => 1, | ||
| 118 | join_type => "LEFT", | ||
| 119 | on_delete => "CASCADE", | ||
| 120 | on_update => "CASCADE", | ||
| 121 | }, | ||
| 122 | ); | ||
| 123 | |||
| 124 | |||
| 125 | # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02 | ||
| 126 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Qca1PyaO19TdNK0RCgjaAw | ||
| 127 | |||
| 128 | |||
| 129 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 130 | 1 | __PACKAGE__->meta->make_immutable; | |
| 131 | |||
| 132 | # declare a primary key | ||
| 133 | 1 | __PACKAGE__->set_primary_key("attr_id"); | |
| 134 | |||
| 135 | |||
| 136 | 1 | 1; | |