Hopkins/Store/Schema/Row/Task.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Hopkins::Store::Schema::Row::Task;
2  
3 use strict;
4  
5 =head1 NAME
6  
7 Hopkins::Schema::Row::Task - ORM relational class defining a point-in-time execution
8  
9 =head1 DESCRIPTION
10  
11 =cut
12  
13 use base 'DBIx::Class';
14  
15 __PACKAGE__->load_components(qw/PK::Auto Core/);
16  
17 __PACKAGE__->table('tasks');
18 __PACKAGE__->add_columns(
19 id => {
20 data_type => 'char',
21 size => 36,
22 is_nullable => 0,
23 default_value => undef,
24 is_auto_increment => 0,
25 is_foreign_key => 0
26 },
27 name => {
28 data_type => 'varchar',
29 size => 255,
30 is_nullable => 0,
31 default_value => undef,
32 is_auto_increment => 0,
33 is_foreign_key => 0
34 },
35 queue => {
36 data_type => 'varchar',
37 size => 255,
38 is_nullable => 0,
39 default_value => undef,
40 is_auto_increment => 0,
41 is_foreign_key => 0
42 },
43 started => {
44 data_type => 'tinyint',
45 size => 1,
46 is_nullable => 0,
47 default_value => 0,
48 is_auto_increment => 0,
49 is_foreign_key => 0
50 },
51 completed => {
52 data_type => 'tinyint',
53 size => 1,
54 is_nullable => 0,
55 default_value => 0,
56 is_auto_increment => 0,
57 is_foreign_key => 0
58 },
59 succeeded => {
60 data_type => 'tinyint',
61 size => 1,
62 is_nullable => 0,
63 default_value => 0,
64 is_auto_increment => 0,
65 is_foreign_key => 0
66 },
67 failed => {
68 data_type => 'tinyint',
69 size => 1,
70 is_nullable => 0,
71 default_value => 0,
72 is_auto_increment => 0,
73 is_foreign_key => 0
74 },
75 aborted => {
76 data_type => 'tinyint',
77 size => 1,
78 is_nullable => 0,
79 default_value => 0,
80 is_auto_increment => 0,
81 is_foreign_key => 0
82 },
83 date_enqueued => {
84 data_type => 'datetime',
85 size => 0,
86 is_nullable => 0,
87 default_value => undef,
88 is_auto_increment => 0,
89 is_foreign_key => 0
90 },
91 date_to_execute => {
92 data_type => 'datetime',
93 size => 0,
94 is_nullable => 0,
95 default_value => undef,
96 is_auto_increment => 0,
97 is_foreign_key => 0
98 },
99 date_started => {
100 data_type => 'datetime',
101 size => 0,
102 is_nullable => 1,
103 default_value => 'NULL',
104 is_auto_increment => 0,
105 is_foreign_key => 0
106 },
107 date_completed => {
108 data_type => 'datetime',
109 size => 0,
110 is_nullable => 1,
111 default_value => 'NULL',
112 is_auto_increment => 0,
113 is_foreign_key => 0
114 }
115 );
116 __PACKAGE__->set_primary_key('id');
117  
118 __PACKAGE__->add_relationship('output', 'Hopkins::Store::Schema::Row::TaskOutput',
119 { 'foreign.task' => 'self.id' },
120 { 'accessor' => 'single' }
121 );
122  
123 __PACKAGE__->inflate_column('date_enqueued', {
124 inflate => sub { DateTime::Format::ISO8601->parse_datetime(shift) },
125 deflate => sub { shift->iso8601 }
126 });
127 __PACKAGE__->inflate_column('date_to_execute', {
128 inflate => sub { DateTime::Format::ISO8601->parse_datetime(shift) },
129 deflate => sub { shift->iso8601 }
130 });
131 __PACKAGE__->inflate_column('date_started', {
132 inflate => sub { DateTime::Format::ISO8601->parse_datetime(shift) },
133 deflate => sub { shift->iso8601 }
134 });
135 __PACKAGE__->inflate_column('date_completed', {
136 inflate => sub { DateTime::Format::ISO8601->parse_datetime(shift) },
137 deflate => sub { shift->iso8601 }
138 });
139  
140 =back
141  
142 =head1 AUTHOR
143  
144 Mike Eldridge <diz@cpan.org>
145  
146 =cut
147  
148 1;