Removed unneedable RDBO exported function.
[blog.pm.git] / lib / Blog / RDBO / Page.pm
blob4a5f4743ae023873867eafb2d51d01c1f67c3d76
1 package Blog::RDBO::Page;
3 use strict;
5 use base qw(Blog::DB::Object::I18N::Static);
7 __PACKAGE__->meta->setup(
8 table => 'page',
10 columns => [
11 qw/ id key orig_lang /,
12 rank => { default => 0 },
13 addtime => { type => 'epoch', default => 'now' },
14 modtime => { type => 'epoch', default => 'now'}
17 primary_key_columns => [ qw/ id / ],
19 unique_key => [ qw/ key / ],
21 relationships => [
22 page_i18n => {
23 type => 'one to many',
24 class => 'Blog::RDBO::PageI18N',
25 column_map => { id => 'page_id' }
30 __PACKAGE__->utf8_columns( qw/ key / );
32 __PACKAGE__->meta->column( 'modtime' )->add_trigger(
33 event => 'on_save',
34 code => sub {
35 my $self = shift;
36 my $value = $self->modtime;
38 $self->modtime( time );
43 =head1 AUTHOR
45 vti
47 =head1 LICENSE
49 This library is free software, you can redistribute it and/or modify
50 it under the same terms as Perl itself.
52 =cut