]>
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::Limit>
275 __PACKAGE__->has_many(
277 "Gruntmaster
::Data
::Result
::Limit
",
278 { "foreign
.problem
" => "self
.id
" },
279 { cascade_copy => 0, cascade_delete => 0 },
286 Related object: L<Gruntmaster::Data::Result::Open>
290 __PACKAGE__->has_many(
292 "Gruntmaster
::Data
::Result
::Open
",
293 { "foreign
.problem
" => "self
.id
" },
294 { cascade_copy => 0, cascade_delete => 0 },
301 Related object: L<Gruntmaster::Data::Result::User>
305 __PACKAGE__->belongs_to(
307 "Gruntmaster
::Data
::Result
::User
",
309 { is_deferrable => 0, on_delete => "CASCADE
", on_update => "NO ACTION
" },
312 =head2 problem_statuses
316 Related object: L<Gruntmaster::Data::Result::ProblemStatus>
320 __PACKAGE__->has_many(
322 "Gruntmaster
::Data
::Result
::ProblemStatus
",
323 { "foreign
.problem
" => "self
.id
" },
324 { cascade_copy => 0, cascade_delete => 0 },
331 Composing rels: L</contest_problems> -> contest
335 __PACKAGE__->many_to_many("contests
", "contest_problems
", "contest
");
338 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-03-16 17:16:58
339 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N7cuqDEGSn5rf8V5GovRQQ
341 use Class::Method::Modifiers qw/after/;
343 after qw/insert update delete/ => sub {
345 Gruntmaster::Data::purge '/pb/';
346 Gruntmaster::Data::purge '/pb/' . $self->id;
347 Gruntmaster::Data::purge '/sol/' . $self->id;
351 $_->rerun for shift->jobs
362 Reruns all jobs for this problem.
366 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
368 =head1 COPYRIGHT AND LICENSE
370 Copyright (C) 2014 by Marius Gavrilescu
372 This library is free software; you can redistribute it and/or modify
373 it under the same terms as Perl itself, either Perl version 5.18.1 or,
374 at your option, any later version of Perl 5 you may have available.
This page took 0.063334 seconds and 5 git commands to generate.