Removed unneedable RDBO exported function.
[blog.pm.git] / lib / Blog / RDBO / Comment.pm
blob4e52a8ffd7ec1e6796ae9e81b2b0147a50f90480
1 package Blog::RDBO::Comment;
3 use strict;
5 use base qw(Blog::DB::Object);
7 __PACKAGE__->meta->setup(
8 table => 'comment',
10 columns => [
11 qw/
13 post_id
14 isauthor
15 email
16 name
17 openid
18 content
20 addtime => { type => 'epoch', default => 'now' }
23 primary_key_columns => [ 'id' ],
25 relationships => [
26 post => {
27 type => 'many to one',
28 class => 'Blog::RDBO::Post',
29 key_columns => { post_id => 'id' }
34 __PACKAGE__->utf8_columns( qw/ name content / );
36 sub comment_count {
37 my ( $self ) = shift;
39 $self->{ comment_count } = $_[0] if @_;
41 return $self->{ comment_count };
44 =head1 AUTHOR
46 vti
48 =head1 LICENSE
50 This library is free software, you can redistribute it and/or modify
51 it under the same terms as Perl itself.
53 =cut