Messing with common i18n modules.
[blog.pm.git] / lib / Blog / RDBO / Comment.pm
blobfb0d329498043226dec40dd2aad7fed35d660f09
1 package Blog::RDBO::Comment;
3 use strict;
5 use base qw(Blog::DB::Object);
7 use Rose::DB::Object::Helpers 'column_value_pairs';
9 __PACKAGE__->meta->setup(
10 table => 'comment',
12 columns => [
13 qw/
15 post_id
16 isauthor
17 email
18 name
19 openid
20 content
22 addtime => { type => 'epoch', default => 'now' }
25 primary_key_columns => [ 'id' ],
27 relationships => [
28 post => {
29 type => 'many to one',
30 class => 'Blog::RDBO::Post',
31 key_columns => { post_id => 'id' }
36 __PACKAGE__->utf8_columns( qw/ name content / );
38 sub comment_count {
39 my ( $self ) = shift;
41 $self->{ comment_count } = $_[0] if @_;
43 return $self->{ comment_count };
46 =head1 AUTHOR
48 vti
50 =head1 LICENSE
52 This library is free software, you can redistribute it and/or modify
53 it under the same terms as Perl itself.
55 =cut