6 use base qw( DBIx::Class );
8 __PACKAGE__->load_components( qw( DateTime::Epoch TimeStamp Core ) );
9 __PACKAGE__->table( 'foo' );
10 __PACKAGE__->add_columns(
12 data_type => 'bigint',
13 is_auto_increment => 1,
17 data_type => 'varchar',
21 bar => { # epoch stored as an int
22 data_type => 'bigint',
23 inflate_datetime => 1,
25 baz => { # epoch stored as a string
26 data_type => 'varchar',
28 inflate_datetime => 'epoch',
30 # working in conjunction with DBIx::Class::TimeStamp
32 data_type => 'bigint',
33 inflate_datetime => 1,
36 modification_time => {
37 data_type => 'bigint',
38 inflate_datetime => 1,
44 __PACKAGE__->set_primary_key( 'id' );