« blib/lib/RackTables/Schema/Result/EntityLink.pm
↑ Summary
blib/lib/RackTables/Schema/Result/FileLink.pm »
| 1 | package RackTables::Schema::Result::File; | ||
| 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::File | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | 1 | __PACKAGE__->table("File"); | |
| 22 | |||
| 23 | =head1 ACCESSORS | ||
| 24 | |||
| 25 | =head2 id | ||
| 26 | |||
| 27 | data_type: 'integer' | ||
| 28 | extra: {unsigned => 1} | ||
| 29 | is_auto_increment: 1 | ||
| 30 | is_nullable: 0 | ||
| 31 | |||
| 32 | =head2 name | ||
| 33 | |||
| 34 | data_type: 'char' | ||
| 35 | is_nullable: 0 | ||
| 36 | size: 255 | ||
| 37 | |||
| 38 | =head2 type | ||
| 39 | |||
| 40 | data_type: 'char' | ||
| 41 | is_nullable: 0 | ||
| 42 | size: 255 | ||
| 43 | |||
| 44 | =head2 size | ||
| 45 | |||
| 46 | data_type: 'integer' | ||
| 47 | extra: {unsigned => 1} | ||
| 48 | is_nullable: 0 | ||
| 49 | |||
| 50 | =head2 ctime | ||
| 51 | |||
| 52 | data_type: 'datetime' | ||
| 53 | datetime_undef_if_invalid: 1 | ||
| 54 | is_nullable: 0 | ||
| 55 | |||
| 56 | =head2 mtime | ||
| 57 | |||
| 58 | data_type: 'datetime' | ||
| 59 | datetime_undef_if_invalid: 1 | ||
| 60 | is_nullable: 0 | ||
| 61 | |||
| 62 | =head2 atime | ||
| 63 | |||
| 64 | data_type: 'datetime' | ||
| 65 | datetime_undef_if_invalid: 1 | ||
| 66 | is_nullable: 0 | ||
| 67 | |||
| 68 | =head2 thumbnail | ||
| 69 | |||
| 70 | data_type: 'longblob' | ||
| 71 | is_nullable: 1 | ||
| 72 | |||
| 73 | =head2 contents | ||
| 74 | |||
| 75 | data_type: 'longblob' | ||
| 76 | is_nullable: 0 | ||
| 77 | |||
| 78 | =head2 comment | ||
| 79 | |||
| 80 | data_type: 'text' | ||
| 81 | is_nullable: 1 | ||
| 82 | |||
| 83 | =cut | ||
| 84 | |||
| 85 | 1 | __PACKAGE__->add_columns( | |
| 86 | "id", | ||
| 87 | { | ||
| 88 | data_type => "integer", | ||
| 89 | extra => { unsigned => 1 }, | ||
| 90 | is_auto_increment => 1, | ||
| 91 | is_nullable => 0, | ||
| 92 | }, | ||
| 93 | "name", | ||
| 94 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 95 | "type", | ||
| 96 | { data_type => "char", is_nullable => 0, size => 255 }, | ||
| 97 | "size", | ||
| 98 | { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 }, | ||
| 99 | "ctime", | ||
| 100 | { | ||
| 101 | data_type => "datetime", | ||
| 102 | datetime_undef_if_invalid => 1, | ||
| 103 | is_nullable => 0, | ||
| 104 | }, | ||
| 105 | "mtime", | ||
| 106 | { | ||
| 107 | data_type => "datetime", | ||
| 108 | datetime_undef_if_invalid => 1, | ||
| 109 | is_nullable => 0, | ||
| 110 | }, | ||
| 111 | "atime", | ||
| 112 | { | ||
| 113 | data_type => "datetime", | ||
| 114 | datetime_undef_if_invalid => 1, | ||
| 115 | is_nullable => 0, | ||
| 116 | }, | ||
| 117 | "thumbnail", | ||
| 118 | { data_type => "longblob", is_nullable => 1 }, | ||
| 119 | "contents", | ||
| 120 | { data_type => "longblob", is_nullable => 0 }, | ||
| 121 | "comment", | ||
| 122 | { data_type => "text", is_nullable => 1 }, | ||
| 123 | ); | ||
| 124 | 1 | __PACKAGE__->set_primary_key("id"); | |
| 125 | 1 | __PACKAGE__->add_unique_constraint("name", ["name"]); | |
| 126 | |||
| 127 | =head1 RELATIONS | ||
| 128 | |||
| 129 | =head2 file_links | ||
| 130 | |||
| 131 | Type: has_many | ||
| 132 | |||
| 133 | Related object: L<RackTables::Schema::Result::FileLink> | ||
| 134 | |||
| 135 | =cut | ||
| 136 | |||
| 137 | 1 | __PACKAGE__->has_many( | |
| 138 | "file_links", | ||
| 139 | "RackTables::Schema::Result::FileLink", | ||
| 140 | { "foreign.file_id" => "self.id" }, | ||
| 141 | { cascade_copy => 0, cascade_delete => 0 }, | ||
| 142 | ); | ||
| 143 | |||
| 144 | |||
| 145 | # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-26 11:34:02 | ||
| 146 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ckA0PC6L9dlOQVjH6RDIug | ||
| 147 | |||
| 148 | |||
| 149 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 150 | 1 | __PACKAGE__->meta->make_immutable; | |
| 151 | 1 | 1; | |