aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/UserPlannedReport.pm
blob: 7e16e2dd3401f2f537835945312390d2b22ac452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package FixMyStreet::DB::ResultSet::UserPlannedReport;
use base 'DBIx::Class::ResultSet';

use strict;
use warnings;

sub active {
    my $rs = shift;
    $rs->search({ removed => undef });
}

sub for_report {
    my $rs = shift;
    my $problem_id = shift;
    $rs->search({ report_id => $problem_id });
}

sub remove {
    my $rs = shift;
    $rs->update({ removed => \'current_timestamp' });
}

1;