]> iEval git - gruntmaster-data.git/blobdiff - lib/Gruntmaster/Data/Result/Problem.pm
Add problem_status, contest_status and a method that updates them
[gruntmaster-data.git] / lib / Gruntmaster / Data / Result / Problem.pm
index 5b843919c7250507743fc5d542be7012a138aeb6..6359b99af1740672be8e88f8842f5a42facfee79 100644 (file)
@@ -80,6 +80,11 @@ __PACKAGE__->table("problems");
   data_type: 'text'
   is_nullable: 0
 
+=head2 solution
+
+  data_type: 'text'
+  is_nullable: 1
+
 =head2 statement
 
   data_type: 'text'
@@ -103,7 +108,7 @@ __PACKAGE__->table("problems");
 =head2 value
 
   data_type: 'integer'
-  is_nullable: 1
+  is_nullable: 0
 
 =head2 genformat
 
@@ -150,6 +155,8 @@ __PACKAGE__->add_columns(
   { data_type => "boolean", default_value => \"false", is_nullable => 0 },
   "runner",
   { data_type => "text", is_nullable => 0 },
+  "solution",
+  { data_type => "text", is_nullable => 1 },
   "statement",
   { data_type => "text", is_nullable => 0 },
   "testcnt",
@@ -159,7 +166,7 @@ __PACKAGE__->add_columns(
   "timeout",
   { data_type => "real", is_nullable => 0 },
   "value",
-  { data_type => "integer", is_nullable => 1 },
+  { data_type => "integer", is_nullable => 0 },
   "genformat",
   { data_type => "text", is_nullable => 1 },
   "gensource",
@@ -244,6 +251,21 @@ __PACKAGE__->belongs_to(
   { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
 );
 
+=head2 problem_statuses
+
+Type: has_many
+
+Related object: L<Gruntmaster::Data::Result::ProblemStatus>
+
+=cut
+
+__PACKAGE__->has_many(
+  "problem_statuses",
+  "Gruntmaster::Data::Result::ProblemStatus",
+  { "foreign.problem" => "self.id" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 contests
 
 Type: many_to_many
@@ -255,8 +277,8 @@ Composing rels: L</contest_problems> -> contest
 __PACKAGE__->many_to_many("contests", "contest_problems", "contest");
 
 
-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-05-16 15:03:32
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tvap77v0faSMxFiLu1uggQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-11 23:51:27
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1SnNCeJdFr5lM3mmO6rtqA
 
 sub is_private {
        my ($self, $time) = @_;
This page took 0.023648 seconds and 4 git commands to generate.