]>
iEval git - gruntmaster-data.git/blob - lib/Gruntmaster/Data/Result/Problem.pm
2 package Gruntmaster
::Data
::Result
::Problem
;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Gruntmaster::Data::Result::Problem - List of problems
16 use base
'DBIx::Class::Core';
18 =head1 TABLE: C<problems>
22 __PACKAGE__
->table("problems");
36 Full name(s) of problem author(s)/problemsetter(s)/tester(s)/etc
43 Full name(s) of statement writer(s) (DEPRECATED)
50 Generator class, without the leading Gruntmaster::Daemon::Generator::
57 Judge class, without the leading Gruntmaster::Daemon::Judge::
64 Problem level, one of beginner, easy, medium, hard
76 Output limit (in bytes)
95 Runner class, without the leading Gruntmaster::Daemon::Runner::
123 Number of pretests. NULL indicates full feedback.
130 JSON array of test values for ::Runner::File
137 Time limit (in seconds)
144 Problem value when used in a contest.
151 Format (programming language) of the generator if using the Run generator
158 Source code of generator if using the Run generator
165 Format (programming language) of the verifier if using the Verifier runner
172 Source code of verifier if using the Verifier runner
176 __PACKAGE__
->add_columns(
178 { data_type
=> "text", is_nullable
=> 0 },
180 { data_type
=> "text", is_nullable
=> 1 },
182 { data_type
=> "text", is_nullable
=> 1 },
184 { data_type
=> "text", is_nullable
=> 0 },
186 { data_type
=> "text", is_nullable
=> 0 },
188 { data_type
=> "text", is_nullable
=> 0 },
190 { data_type
=> "text", is_nullable
=> 0 },
192 { data_type
=> "integer", is_nullable
=> 1 },
194 { data_type
=> "text", is_foreign_key
=> 1, is_nullable
=> 0 },
196 { data_type
=> "boolean", default_value
=> \"false
", is_nullable => 0 },
198 { data_type => "text
", is_nullable => 0 },
200 { data_type => "text
", is_nullable => 1 },
202 { data_type => "text
", is_nullable => 0 },
204 { data_type => "integer
", is_nullable => 0 },
206 { data_type => "integer
", is_nullable => 1 },
208 { data_type => "text
", is_nullable => 1 },
210 { data_type => "real
", is_nullable => 0 },
212 { data_type => "integer
", is_nullable => 0 },
214 { data_type => "text
", is_nullable => 1 },
216 { data_type => "text
", is_nullable => 1 },
218 { data_type => "text
", is_nullable => 1 },
220 { data_type => "text
", is_nullable => 1 },
233 __PACKAGE__->set_primary_key("id
");
237 =head2 contest_problems
241 Related object: L<Gruntmaster::Data::Result::ContestProblem>
245 __PACKAGE__->has_many(
247 "Gruntmaster
::Data
::Result
::ContestProblem
",
248 { "foreign
.problem
" => "self
.id
" },
249 { cascade_copy => 0, cascade_delete => 0 },
256 Related object: L<Gruntmaster::Data::Result::Job>
260 __PACKAGE__->has_many(
262 "Gruntmaster
::Data
::Result
::Job
",
263 { "foreign
.problem
" => "self
.id
" },
264 { cascade_copy => 0, cascade_delete => 0 },
271 Related object: L<Gruntmaster::Data::Result::Open>
275 __PACKAGE__->has_many(
277 "Gruntmaster
::Data
::Result
::Open
",
278 { "foreign
.problem
" => "self
.id
" },
279 { cascade_copy => 0, cascade_delete => 0 },
286 Related object: L<Gruntmaster::Data::Result::User>
290 __PACKAGE__->belongs_to(
292 "Gruntmaster
::Data
::Result
::User
",
294 { is_deferrable => 0, on_delete => "CASCADE
", on_update => "NO ACTION
" },
297 =head2 problem_statuses
301 Related object: L<Gruntmaster::Data::Result::ProblemStatus>
305 __PACKAGE__->has_many(
307 "Gruntmaster
::Data
::Result
::ProblemStatus
",
308 { "foreign
.problem
" => "self
.id
" },
309 { cascade_copy => 0, cascade_delete => 0 },
316 Composing rels: L</contest_problems> -> contest
320 __PACKAGE__->many_to_many("contests
", "contest_problems
", "contest
");
323 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-02-14 09:42:26
324 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sc9vhXkFlp0UaLK7w0OUXA
326 use Class::Method::Modifiers qw/after/;
328 after qw/insert update delete/ => sub {
330 Gruntmaster::Data::purge '/pb/';
331 Gruntmaster::Data::purge '/pb/' . $self->id;
332 Gruntmaster::Data::purge '/sol/' . $self->id;
336 $_->rerun for shift->jobs
347 Reruns all jobs for this problem.
351 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
353 =head1 COPYRIGHT AND LICENSE
355 Copyright (C) 2014 by Marius Gavrilescu
357 This library is free software; you can redistribute it and/or modify
358 it under the same terms as Perl itself, either Perl version 5.18.1 or,
359 at your option, any later version of Perl 5 you may have available.
This page took 0.065693 seconds and 4 git commands to generate.