| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_19_7::Result::EntityLink; | ||
| 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_7::Result::EntityLink | ||
| 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<EntityLink> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("EntityLink"); | ||
| 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 parent_entity_type | ||
| 46 | |||
| 47 | data_type: 'enum' | ||
| 48 | extra: {list => ["ipv4net","ipv4rspool","ipv4vs","ipv6net","object","rack","user"]} | ||
| 49 | is_nullable: 0 | ||
| 50 | |||
| 51 | =head2 parent_entity_id | ||
| 52 | |||
| 53 | data_type: 'integer' | ||
| 54 | extra: {unsigned => 1} | ||
| 55 | is_nullable: 0 | ||
| 56 | |||
| 57 | =head2 child_entity_type | ||
| 58 | |||
| 59 | data_type: 'enum' | ||
| 60 | extra: {list => ["file","object"]} | ||
| 61 | is_nullable: 0 | ||
| 62 | |||
| 63 | =head2 child_entity_id | ||
| 64 | |||
| 65 | data_type: 'integer' | ||
| 66 | extra: {unsigned => 1} | ||
| 67 | is_nullable: 0 | ||
| 68 | |||
| 69 | =cut | ||
| 70 | |||
| 71 | __PACKAGE__->add_columns( | ||
| 72 | "id", | ||
| 73 | { | ||
| 74 | data_type => "integer", | ||
| 75 | extra => { unsigned => 1 }, | ||
| 76 | is_auto_increment => 1, | ||
| 77 | is_nullable => 0, | ||
| 78 | }, | ||
| 79 | "parent_entity_type", | ||
| 80 | { | ||
| 81 | data_type => "enum", | ||
| 82 | extra => { | ||
| 83 | list => [ | ||
| 84 | "ipv4net", | ||
| 85 | "ipv4rspool", | ||
| 86 | "ipv4vs", | ||
| 87 | "ipv6net", | ||
| 88 | "object", | ||
| 89 | "rack", | ||
| 90 | "user", | ||
| 91 | ], | ||
| 92 | }, | ||
| 93 | is_nullable => 0, | ||
| 94 | }, | ||
| 95 | "parent_entity_id", | ||
| 96 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 }, | ||
| 97 | "child_entity_type", | ||
| 98 | { | ||
| 99 | data_type => "enum", | ||
| 100 | extra => { list => ["file", "object"] }, | ||
| 101 | is_nullable => 0, | ||
| 102 | }, | ||
| 103 | "child_entity_id", | ||
| 104 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 }, | ||
| 105 | ); | ||
| 106 | |||
| 107 | =head1 PRIMARY KEY | ||
| 108 | |||
| 109 | =over 4 | ||
| 110 | |||
| 111 | =item * L</id> | ||
| 112 | |||
| 113 | =back | ||
| 114 | |||
| 115 | =cut | ||
| 116 | |||
| 117 | __PACKAGE__->set_primary_key("id"); | ||
| 118 | |||
| 119 | =head1 UNIQUE CONSTRAINTS | ||
| 120 | |||
| 121 | =head2 C<EntityLink-unique> | ||
| 122 | |||
| 123 | =over 4 | ||
| 124 | |||
| 125 | =item * L</parent_entity_type> | ||
| 126 | |||
| 127 | =item * L</parent_entity_id> | ||
| 128 | |||
| 129 | =item * L</child_entity_type> | ||
| 130 | |||
| 131 | =item * L</child_entity_id> | ||
| 132 | |||
| 133 | =back | ||
| 134 | |||
| 135 | =cut | ||
| 136 | |||
| 137 | __PACKAGE__->add_unique_constraint( | ||
| 138 | "EntityLink-unique", | ||
| 139 | [ | ||
| 140 | "parent_entity_type", | ||
| 141 | "parent_entity_id", | ||
| 142 | "child_entity_type", | ||
| 143 | "child_entity_id", | ||
| 144 | ], | ||
| 145 | ); | ||
| 146 | |||
| 147 | |||
| 148 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:02:10 | ||
| 149 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gds5yzhLlnGGhU4lQ5xB9A | ||
| 150 | |||
| 151 | |||
| 152 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 153 | 1; |