X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FProblem.pm;h=6359b99af1740672be8e88f8842f5a42facfee79;hb=edfc5928b7d9ee441f2f0eaf9b3cadec58bbf947;hp=05b6de94f14f935a306cc682ed0ad6afb6ab2ec3;hpb=4a8747effd02a1e0f9dde86b1c81f6c26ce66f04;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/Problem.pm b/lib/Gruntmaster/Data/Result/Problem.pm index 05b6de9..6359b99 100644 --- a/lib/Gruntmaster/Data/Result/Problem.pm +++ b/lib/Gruntmaster/Data/Result/Problem.pm @@ -40,20 +40,17 @@ __PACKAGE__->table("problems"); =head2 generator - data_type: 'enum' - extra: {custom_type_name => "generator",list => ["File","Run","Undef"]} + data_type: 'text' is_nullable: 0 =head2 judge - data_type: 'enum' - extra: {custom_type_name => "judge",list => ["Absolute","Points"]} + data_type: 'text' is_nullable: 0 =head2 level - data_type: 'enum' - extra: {custom_type_name => "plevel",list => ["beginner","easy","medium","hard"]} + data_type: 'text' is_nullable: 0 =head2 name @@ -80,10 +77,14 @@ __PACKAGE__->table("problems"); =head2 runner - data_type: 'enum' - extra: {custom_type_name => "runner",list => ["File","Verifier","Interactive"]} + data_type: 'text' is_nullable: 0 +=head2 solution + + data_type: 'text' + is_nullable: 1 + =head2 statement data_type: 'text' @@ -107,7 +108,7 @@ __PACKAGE__->table("problems"); =head2 value data_type: 'integer' - is_nullable: 1 + is_nullable: 0 =head2 genformat @@ -139,26 +140,11 @@ __PACKAGE__->add_columns( "writer", { data_type => "text", is_nullable => 1 }, "generator", - { - data_type => "enum", - extra => { custom_type_name => "generator", list => ["File", "Run", "Undef"] }, - is_nullable => 0, - }, + { data_type => "text", is_nullable => 0 }, "judge", - { - data_type => "enum", - extra => { custom_type_name => "judge", list => ["Absolute", "Points"] }, - is_nullable => 0, - }, + { data_type => "text", is_nullable => 0 }, "level", - { - data_type => "enum", - extra => { - custom_type_name => "plevel", - list => ["beginner", "easy", "medium", "hard"], - }, - is_nullable => 0, - }, + { data_type => "text", is_nullable => 0 }, "name", { data_type => "text", is_nullable => 0 }, "olimit", @@ -168,14 +154,9 @@ __PACKAGE__->add_columns( "private", { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "runner", - { - data_type => "enum", - extra => { - custom_type_name => "runner", - list => ["File", "Verifier", "Interactive"], - }, - is_nullable => 0, - }, + { data_type => "text", is_nullable => 0 }, + "solution", + { data_type => "text", is_nullable => 1 }, "statement", { data_type => "text", is_nullable => 0 }, "testcnt", @@ -185,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", @@ -267,7 +248,22 @@ __PACKAGE__->belongs_to( "owner", "Gruntmaster::Data::Result::User", { id => "owner" }, - { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, + { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, +); + +=head2 problem_statuses + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "problem_statuses", + "Gruntmaster::Data::Result::ProblemStatus", + { "foreign.problem" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 contests @@ -281,8 +277,8 @@ Composing rels: L -> contest __PACKAGE__->many_to_many("contests", "contest_problems", "contest"); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-30 12:59:34 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ujwyMJ5Pup1i5NKXkPkg2g +# 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) = @_;