slightly different testing strategy
[dbsrgits/DBIx-Class-DateTime-Epoch.git] / t / lib / MySchema / Foo.pm
CommitLineData
8e52f1da 1package MySchema::Foo;
2
3use strict;
4use warnings;
5
6use base qw( DBIx::Class );
7
8__PACKAGE__->load_components( qw( DateTime::Epoch TimeStamp Core ) );
9__PACKAGE__->table( 'foo' );
10__PACKAGE__->add_columns(
11 id => {
12 data_type => 'bigint',
13 is_auto_increment => 1,
14 is_nullable => 0,
15 },
16 name => {
17 data_type => 'varchar',
18 size => 10,
19 is_nullable => 1,
20 },
21 bar => { # epoch stored as an int
22 data_type => 'bigint',
23 inflate_datetime => 1,
24 },
25 baz => { # epoch stored as a string
26 data_type => 'varchar',
27 size => 50,
28 inflate_datetime => 'epoch',
29 },
3be80851 30 dt => { # regular datetime field -- should not conflict
31 data_type => 'datetime',
32 inflate_datetime => 1,
33 },
8e52f1da 34 # working in conjunction with DBIx::Class::TimeStamp
35 creation_time => {
36 data_type => 'bigint',
37 inflate_datetime => 1,
38 set_on_create => 1,
39 },
40 modification_time => {
41 data_type => 'bigint',
42 inflate_datetime => 1,
43 set_on_create => 1,
44 set_on_update => 1,
3be80851 45 }
8e52f1da 46);
47
48__PACKAGE__->set_primary_key( 'id' );
49
501;