X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FContestStatus.pm;fp=lib%2FGruntmaster%2FData%2FResult%2FContestStatus.pm;h=0000000000000000000000000000000000000000;hb=23aa7eca080d8c8a6785b28a5c64feff3849e9cf;hp=d4ed8fe4d07d7707de43f5c2f3226deb643ab5f6;hpb=52172a1a697be94c99123f265ebcd64871d6379e;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/ContestStatus.pm b/lib/Gruntmaster/Data/Result/ContestStatus.pm deleted file mode 100644 index d4ed8fe..0000000 --- a/lib/Gruntmaster/Data/Result/ContestStatus.pm +++ /dev/null @@ -1,121 +0,0 @@ -use utf8; -package Gruntmaster::Data::Result::ContestStatus; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -=head1 NAME - -Gruntmaster::Data::Result::ContestStatus - List of (contest, user, result) - -=cut - -use strict; -use warnings; - -use base 'DBIx::Class::Core'; - -=head1 TABLE: C - -=cut - -__PACKAGE__->table("contest_status"); - -=head1 ACCESSORS - -=head2 contest - - data_type: 'text' - is_foreign_key: 1 - is_nullable: 0 - -=head2 owner - - data_type: 'text' - is_foreign_key: 1 - is_nullable: 0 - -=head2 score - - data_type: 'integer' - is_nullable: 0 - -=head2 rank - - data_type: 'integer' - is_nullable: 0 - -=cut - -__PACKAGE__->add_columns( - "contest", - { data_type => "text", is_foreign_key => 1, is_nullable => 0 }, - "owner", - { data_type => "text", is_foreign_key => 1, is_nullable => 0 }, - "score", - { data_type => "integer", is_nullable => 0 }, - "rank", - { data_type => "integer", is_nullable => 0 }, -); - -=head1 PRIMARY KEY - -=over 4 - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->set_primary_key("owner", "contest"); - -=head1 RELATIONS - -=head2 contest - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "contest", - "Gruntmaster::Data::Result::Contest", - { id => "contest" }, - { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, -); - -=head2 owner - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "owner", - "Gruntmaster::Data::Result::User", - { id => "owner" }, - { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:44:22 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IkY4FNON0SrxrP8oNOXoHg - -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; -}; - -1;