7
|
1 package Benzin::Bugzilla::BugComment;
|
|
2 use strict;
|
|
3
|
|
4 my @fields;
|
|
5
|
|
6 BEGIN {
|
|
7 @fields = qw(
|
|
8 id
|
8
|
9 bug_id
|
|
10 attachment_id
|
|
11 count
|
|
12 text
|
|
13 creator
|
|
14 creation_time
|
|
15 is_private
|
|
16 is_markdown
|
7
|
17 );
|
|
18 }
|
|
19
|
|
20 use constant {
|
|
21 BUG_FIELDS => \@fields
|
|
22 };
|
|
23
|
|
24 use IMPL::declare {
|
|
25 base => [
|
|
26 'IMPL::Object::Fields' => undef
|
|
27 ]
|
|
28 };
|
|
29
|
|
30 use fields @fields;
|
|
31
|
|
32 sub CTOR {
|
|
33 my SELF $this = shift;
|
|
34 my $data = shift;
|
|
35
|
|
36 $this->{$_} = $data->{$_} foreach grep exists $data->{$_}, SELF->BUG_FIELDS;
|
|
37 }
|
|
38
|
|
39
|
|
40 1;
|