| 1 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Schema::RackTables::0_20_11::Result::AttributeMap; | ||
| 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_11::Result::AttributeMap | ||
| 10 | |||
| 11 | =cut | ||
| 12 | |||
| 13 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 2 | ▶ | use base 'DBIx::Class::Core'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 2 | __PACKAGE__->load_components("InflateColumn::DateTime"); | |
| 29 | |||
| 30 | =head1 TABLE: C<AttributeMap> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | 2 | __PACKAGE__->table("AttributeMap"); | |
| 35 | |||
| 36 | =head1 ACCESSORS | ||
| 37 | |||
| 38 | =head2 objtype_id | ||
| 39 | |||
| 40 | data_type: 'integer' | ||
| 41 | default_value: 1 | ||
| 42 | extra: {unsigned => 1} | ||
| 43 | is_nullable: 0 | ||
| 44 | |||
| 45 | =head2 attr_id | ||
| 46 | |||
| 47 | data_type: 'integer' | ||
| 48 | default_value: 1 | ||
| 49 | extra: {unsigned => 1} | ||
| 50 | is_foreign_key: 1 | ||
| 51 | is_nullable: 0 | ||
| 52 | |||
| 53 | =head2 chapter_id | ||
| 54 | |||
| 55 | data_type: 'integer' | ||
| 56 | extra: {unsigned => 1} | ||
| 57 | is_foreign_key: 1 | ||
| 58 | is_nullable: 1 | ||
| 59 | |||
| 60 | =head2 sticky | ||
| 61 | |||
| 62 | data_type: 'enum' | ||
| 63 | default_value: 'no' | ||
| 64 | extra: {list => ["yes","no"]} | ||
| 65 | is_nullable: 1 | ||
| 66 | |||
| 67 | =cut | ||
| 68 | |||
| 69 | 2 | __PACKAGE__->add_columns( | |
| 70 | "objtype_id", | ||
| 71 | { | ||
| 72 | data_type => "integer", | ||
| 73 | default_value => 1, | ||
| 74 | extra => { unsigned => 1 }, | ||
| 75 | is_nullable => 0, | ||
| 76 | }, | ||
| 77 | "attr_id", | ||
| 78 | { | ||
| 79 | data_type => "integer", | ||
| 80 | default_value => 1, | ||
| 81 | extra => { unsigned => 1 }, | ||
| 82 | is_foreign_key => 1, | ||
| 83 | is_nullable => 0, | ||
| 84 | }, | ||
| 85 | "chapter_id", | ||
| 86 | { | ||
| 87 | data_type => "integer", | ||
| 88 | extra => { unsigned => 1 }, | ||
| 89 | is_foreign_key => 1, | ||
| 90 | is_nullable => 1, | ||
| 91 | }, | ||
| 92 | "sticky", | ||
| 93 | { | ||
| 94 | data_type => "enum", | ||
| 95 | default_value => "no", | ||
| 96 | extra => { list => ["yes", "no"] }, | ||
| 97 | is_nullable => 1, | ||
| 98 | }, | ||
| 99 | ); | ||
| 100 | |||
| 101 | =head1 UNIQUE CONSTRAINTS | ||
| 102 | |||
| 103 | =head2 C<objtype_id> | ||
| 104 | |||
| 105 | =over 4 | ||
| 106 | |||
| 107 | =item * L</objtype_id> | ||
| 108 | |||
| 109 | =item * L</attr_id> | ||
| 110 | |||
| 111 | =back | ||
| 112 | |||
| 113 | =cut | ||
| 114 | |||
| 115 | 2 | __PACKAGE__->add_unique_constraint("objtype_id", ["objtype_id", "attr_id"]); | |
| 116 | |||
| 117 | =head1 RELATIONS | ||
| 118 | |||
| 119 | =head2 attr | ||
| 120 | |||
| 121 | Type: belongs_to | ||
| 122 | |||
| 123 | Related object: L<Schema::RackTables::0_20_11::Result::Attribute> | ||
| 124 | |||
| 125 | =cut | ||
| 126 | |||
| 127 | 2 | __PACKAGE__->belongs_to( | |
| 128 | "attr", | ||
| 129 | "Schema::RackTables::0_20_11::Result::Attribute", | ||
| 130 | { id => "attr_id" }, | ||
| 131 | { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, | ||
| 132 | ); | ||
| 133 | |||
| 134 | =head2 attribute_values | ||
| 135 | |||
| 136 | Type: has_many | ||
| 137 | |||
| 138 | Related object: L<Schema::RackTables::0_20_11::Result::AttributeValue> | ||
| 139 | |||
| 140 | =cut | ||
| 141 | |||
| 142 | 2 | __PACKAGE__->has_many( | |
| 143 | "attribute_values", | ||
| 144 | "Schema::RackTables::0_20_11::Result::AttributeValue", | ||
| 145 | { | ||
| 146 | "foreign.attr_id" => "self.attr_id", | ||
| 147 | "foreign.object_tid" => "self.objtype_id", | ||
| 148 | }, | ||
| 149 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 150 | ); | ||
| 151 | |||
| 152 | =head2 chapter | ||
| 153 | |||
| 154 | Type: belongs_to | ||
| 155 | |||
| 156 | Related object: L<Schema::RackTables::0_20_11::Result::Chapter> | ||
| 157 | |||
| 158 | =cut | ||
| 159 | |||
| 160 | 2 | __PACKAGE__->belongs_to( | |
| 161 | "chapter", | ||
| 162 | "Schema::RackTables::0_20_11::Result::Chapter", | ||
| 163 | { id => "chapter_id" }, | ||
| 164 | { | ||
| 165 | is_deferrable => 1, | ||
| 166 | join_type => "LEFT", | ||
| 167 | on_delete => "RESTRICT", | ||
| 168 | on_update => "RESTRICT", | ||
| 169 | }, | ||
| 170 | ); | ||
| 171 | |||
| 172 | |||
| 173 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2016-05-12 22:07:10 | ||
| 174 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IFXmdwHB31NaOhHt0Oy7Pg | ||
| 175 | |||
| 176 | |||
| 177 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 178 | 2 | 1; | |