Add some utility functions and POD
[gruntmaster-data.git] / lib / Gruntmaster / Data / Result / Job.pm
CommitLineData
4ed3f8e7
MG
1use utf8;
2package Gruntmaster::Data::Result::Job;
3
4# Created by DBIx::Class::Schema::Loader
5# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7=head1 NAME
8
9Gruntmaster::Data::Result::Job
10
11=cut
12
13use strict;
14use warnings;
15
16use base 'DBIx::Class::Core';
17
18=head1 TABLE: C<jobs>
19
20=cut
21
22__PACKAGE__->table("jobs");
23
24=head1 ACCESSORS
25
26=head2 id
27
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
31 sequence: 'jobs_id_seq'
32
33=head2 contest
34
35 data_type: 'text'
36 is_foreign_key: 1
b2725d9d 37 is_nullable: 1
4ed3f8e7
MG
38
39=head2 daemon
40
41 data_type: 'text'
42 is_nullable: 1
43
44=head2 date
45
46 data_type: 'bigint'
47 is_nullable: 0
48
49=head2 errors
50
51 data_type: 'text'
52 is_nullable: 1
53
54=head2 extension
55
56 data_type: 'text'
57 is_nullable: 0
58
59=head2 format
60
61 data_type: 'text'
62 is_nullable: 0
63
64=head2 private
65
66 data_type: 'boolean'
67 default_value: false
68 is_nullable: 0
69
70=head2 problem
71
72 data_type: 'text'
73 is_foreign_key: 1
74 is_nullable: 0
75
76=head2 result
77
78 data_type: 'integer'
79 is_nullable: 1
80
81=head2 result_text
82
83 data_type: 'text'
84 is_nullable: 1
85
86=head2 results
87
85d3f015 88 data_type: 'text'
4ed3f8e7
MG
89 is_nullable: 1
90
91=head2 source
92
93 data_type: 'text'
94 is_nullable: 0
95
96=head2 owner
97
98 data_type: 'text'
99 is_foreign_key: 1
100 is_nullable: 0
101
102=cut
103
104__PACKAGE__->add_columns(
105 "id",
106 {
107 data_type => "integer",
108 is_auto_increment => 1,
109 is_nullable => 0,
110 sequence => "jobs_id_seq",
111 },
112 "contest",
b2725d9d 113 { data_type => "text", is_foreign_key => 1, is_nullable => 1 },
4ed3f8e7
MG
114 "daemon",
115 { data_type => "text", is_nullable => 1 },
116 "date",
117 { data_type => "bigint", is_nullable => 0 },
118 "errors",
119 { data_type => "text", is_nullable => 1 },
120 "extension",
121 { data_type => "text", is_nullable => 0 },
122 "format",
123 { data_type => "text", is_nullable => 0 },
124 "private",
125 { data_type => "boolean", default_value => \"false", is_nullable => 0 },
126 "problem",
127 { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
128 "result",
129 { data_type => "integer", is_nullable => 1 },
130 "result_text",
131 { data_type => "text", is_nullable => 1 },
132 "results",
85d3f015 133 { data_type => "text", is_nullable => 1 },
4ed3f8e7
MG
134 "source",
135 { data_type => "text", is_nullable => 0 },
136 "owner",
137 { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
138);
139
140=head1 PRIMARY KEY
141
142=over 4
143
144=item * L</id>
145
146=back
147
148=cut
149
150__PACKAGE__->set_primary_key("id");
151
152=head1 RELATIONS
153
154=head2 contest
155
156Type: belongs_to
157
158Related object: L<Gruntmaster::Data::Result::Contest>
159
160=cut
161
162__PACKAGE__->belongs_to(
163 "contest",
164 "Gruntmaster::Data::Result::Contest",
165 { id => "contest" },
b2725d9d
MG
166 {
167 is_deferrable => 0,
168 join_type => "LEFT",
169 on_delete => "NO ACTION",
170 on_update => "NO ACTION",
171 },
4ed3f8e7
MG
172);
173
174=head2 owner
175
176Type: belongs_to
177
178Related object: L<Gruntmaster::Data::Result::User>
179
180=cut
181
182__PACKAGE__->belongs_to(
183 "owner",
184 "Gruntmaster::Data::Result::User",
185 { id => "owner" },
186 { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
187);
188
189=head2 problem
190
191Type: belongs_to
192
193Related object: L<Gruntmaster::Data::Result::Problem>
194
195=cut
196
197__PACKAGE__->belongs_to(
198 "problem",
199 "Gruntmaster::Data::Result::Problem",
200 { id => "problem" },
201 { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
202);
203
204
85d3f015
MG
205# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-26 15:24:46
206# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dnYOXMU6Or/Wh0m5A1N5UA
4ed3f8e7 207
4a8747ef
MG
208sub rerun {
209 shift->update({daemon => undef, result => -2, result_text => undef});
210}
4ed3f8e7 211
4ed3f8e7 2121;
4a8747ef
MG
213
214__END__
215
216=head1 METHODS
217
218=head2 rerun
219
220Reruns this job.
221
222=head1 AUTHOR
223
224Marius Gavrilescu E<lt>marius@ieval.roE<gt>
225
226=head1 COPYRIGHT AND LICENSE
227
228Copyright (C) 2014 by Marius Gavrilescu
229
230This library is free software; you can redistribute it and/or modify
231it under the same terms as Perl itself, either Perl version 5.18.1 or,
232at your option, any later version of Perl 5 you may have available.
233
234
235=cut
This page took 0.023954 seconds and 4 git commands to generate.