File: Author.pm

package info (click to toggle)
libdbix-class-inflatecolumn-fs-perl 0.01007-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: perl: 2,382; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 668 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package # hide from PAUSE
    My::TestSchema::Author;
use warnings;
use strict;
use base qw/DBIx::Class/;
use File::Temp qw/tempdir/;

__PACKAGE__->load_components(qw/InflateColumn::FS Core/);
__PACKAGE__->table('author');
__PACKAGE__->add_columns(
    id => {
        data_type => 'INT',
        is_auto_increment => 1,
    },
    name => {
        data_type => 'VARCHAR',
        size => 60,
    },
    photo => {
        data_type => 'TEXT',
        is_nullable => 1,
        is_fs_column => 1,
        fs_column_path => tempdir(CLEANUP => 1),
    },
);
__PACKAGE__->set_primary_key(qw/id/);
__PACKAGE__->has_many(books => 'My::TestSchema::Book', 'author_id');

1;