X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FProblemStatus.pm;h=3b8ca4c940603b4eea01e99ec728203ec8c0f768;hb=8c7ef664be3292167762955307464aeeeec6bd0e;hp=09920a704eb591b69c2970727380c3521652ea3f;hpb=adb42d4d148fdb3dd145e4a7452b7b7eda88f66c;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/ProblemStatus.pm b/lib/Gruntmaster/Data/Result/ProblemStatus.pm index 09920a7..3b8ca4c 100644 --- a/lib/Gruntmaster/Data/Result/ProblemStatus.pm +++ b/lib/Gruntmaster/Data/Result/ProblemStatus.pm @@ -6,7 +6,7 @@ package Gruntmaster::Data::Result::ProblemStatus; =head1 NAME -Gruntmaster::Data::Result::ProblemStatus +Gruntmaster::Data::Result::ProblemStatus - List of (problem, user, result) =cut @@ -49,6 +49,8 @@ __PACKAGE__->table("problem_status"); default_value: false is_nullable: 0 +True if the result is Accepted, False otherwise + =cut __PACKAGE__->add_columns( @@ -130,9 +132,17 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-11 23:51:27 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SUAwYQhgBtoCjtFSOMc4FQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:44:22 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1OCTO6sM27DamVhQi3dWKg + +use Class::Method::Modifiers qw/after/; + +sub rawowner { shift->get_column('owner') } +after qw/insert update delete/ => sub { + my ($self) = @_; + Gruntmaster::Data::purge '/us/'; + Gruntmaster::Data::purge '/us/' . $self->rawowner; +}; -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1;