| 1 | use utf8; | ||
| 2 | package Schema::RackTables::0_19_11::Result::File; | ||
| 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_11::Result::File | ||
| 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<File> | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | __PACKAGE__->table("File"); | ||
| 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 name | ||
| 46 | |||
| 47 | data_type: 'char' | ||
| 48 | is_nullable: 0 | ||
| 49 | size: 255 | ||
| 50 | |||
| 51 | =head2 type | ||
| 52 | |||
| 53 | data_type: 'char' | ||
| 54 | is_nullable: 0 | ||
| 55 | size: 255 | ||
| 56 | |||
| 57 | =head2 size | ||
| 58 | |||
| 59 | data_type: 'integer' | ||
| 60 | extra: {unsigned => 1} | ||
| 61 | is_nullable: 0 | ||
| 62 | |||
| 63 | =head2 ctime | ||
| 64 | |||
| 65 | data_type: 'datetime' | ||
| 66 | datetime_undef_if_invalid: 1 | ||
| 67 | is_nullable: 0 | ||
| 68 | |||
| 69 | =head2 mtime | ||
| 70 | |||
| 71 | data_type: 'datetime' | ||
| 72 | datetime_undef_if_invalid: 1 | ||
| 73 | is_nullable: 0 | ||
| 74 | |||
| 75 | =head2 atime | ||
| 76 | |||
| 77 | data_type: 'datetime' | ||
| 78 | datetime_undef_if_invalid: 1 | ||
| 79 | is_nullable: 0 | ||
| 80 | |||
| 81 | =head2 thumbnail | ||
| 82 | |||
| 83 | data_type: 'longblob' | ||
| 84 | is_nullable: 1 | ||
| 85 | |||
| 86 | =head2 contents | ||
| 87 | |||
| 88 | data_type: 'longblob' | ||
| 89 | is_nullable: 0 | ||
| 90 | |||
| 91 | =head2 comment | ||
| 92 | |||
| 93 | data_type: 'text' | ||
| 94 | is_nullable: 1 | ||
| 95 | |||
| 96 | =cut | ||
| 97 | |||
| 98 | __PACKAGE__->add_columns( | ||
| 99 | "id", | ||
| 100 | { | ||
| 101 | data_type => "integer", | ||
| 102 | extra => { unsigned => 1 }, | ||
| 103 | is_auto_increment => 1, | ||
| 104 | is_nullable => 0, | ||
| 105 | }, | ||
| 106 | "name", | ||
| 107 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 108 | "type", | ||
| 109 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 110 | "size", | ||
| 111 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 }, | ||
| 112 | "ctime", | ||
| 113 | { | ||
| 114 | data_type => "datetime", | ||
| 115 | datetime_undef_if_invalid => 1, | ||
| 116 | is_nullable => 0, | ||
| 117 | }, | ||
| 118 | "mtime", | ||
| 119 | { | ||
| 120 | data_type => "datetime", | ||
| 121 | datetime_undef_if_invalid => 1, | ||
| 122 | is_nullable => 0, | ||
| 123 | }, | ||
| 124 | "atime", | ||
| 125 | { | ||
| 126 | data_type => "datetime", | ||
| 127 | datetime_undef_if_invalid => 1, | ||
| 128 | is_nullable => 0, | ||
| 129 | }, | ||
| 130 | "thumbnail", | ||
| 131 | { data_type => "longblob", is_nullable => 1 }, | ||
| 132 | "contents", | ||
| 133 | { data_type => "longblob", is_nullable => 0 }, | ||
| 134 | "comment", | ||
| 135 | { data_type => "text", is_nullable => 1 }, | ||
| 136 | ); | ||
| 137 | |||
| 138 | =head1 PRIMARY KEY | ||
| 139 | |||
| 140 | =over 4 | ||
| 141 | |||
| 142 | =item * L</id> | ||
| 143 | |||
| 144 | =back | ||
| 145 | |||
| 146 | =cut | ||
| 147 | |||
| 148 | __PACKAGE__->set_primary_key("id"); | ||
| 149 | |||
| 150 | =head1 UNIQUE CONSTRAINTS | ||
| 151 | |||
| 152 | =head2 C<name> | ||
| 153 | |||
| 154 | =over 4 | ||
| 155 | |||
| 156 | =item * L</name> | ||
| 157 | |||
| 158 | =back | ||
| 159 | |||
| 160 | =cut | ||
| 161 | |||
| 162 | __PACKAGE__->add_unique_constraint("name", ["name"]); | ||
| 163 | |||
| 164 | =head1 RELATIONS | ||
| 165 | |||
| 166 | =head2 file_links | ||
| 167 | |||
| 168 | Type: has_many | ||
| 169 | |||
| 170 | Related object: L<Schema::RackTables::0_19_11::Result::FileLink> | ||
| 171 | |||
| 172 | =cut | ||
| 173 | |||
| 174 | __PACKAGE__->has_many( | ||
| 175 | "file_links", | ||
| 176 | "Schema::RackTables::0_19_11::Result::FileLink", | ||
| 177 | { "foreign.file_id" => "self.id" }, | ||
| 178 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 179 | ); | ||
| 180 | |||
| 181 | |||
| 182 | # Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-10-22 23:02:48 | ||
| 183 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NZVJ4oF426Mf/5Sq5mP9HA | ||
| 184 | |||
| 185 | |||
| 186 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 187 | 1; |