Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
GroupJoinQueue | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
5 | |
100.00% |
1 / 1 |
setGSActorId | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||||
getGSActorId | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||||
setGroupId | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||||
getGroupId | n/a |
0 / 0 |
1 | n/a |
0 / 0 |
|||||
schemaDef | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
1 | <?php |
2 | |
3 | // {{{ License |
4 | // This file is part of GNU social - https://www.gnu.org/software/social |
5 | // |
6 | // GNU social is free software: you can redistribute it and/or modify |
7 | // it under the terms of the GNU Affero General Public License as published by |
8 | // the Free Software Foundation, either version 3 of the License, or |
9 | // (at your option) any later version. |
10 | // |
11 | // GNU social is distributed in the hope that it will be useful, |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | // GNU Affero General Public License for more details. |
15 | // |
16 | // You should have received a copy of the GNU Affero General Public License |
17 | // along with GNU social. If not, see <http://www.gnu.org/licenses/>. |
18 | // }}} |
19 | |
20 | namespace App\Entity; |
21 | |
22 | use App\Core\Entity; |
23 | |
24 | /** |
25 | * Entity for Queue on joining a group |
26 | * |
27 | * @category DB |
28 | * @package GNUsocial |
29 | * |
30 | * @author Zach Copley <zach@status.net> |
31 | * @copyright 2010 StatusNet Inc. |
32 | * @author Mikael Nordfeldth <mmn@hethane.se> |
33 | * @copyright 2009-2014 Free Software Foundation, Inc http://www.fsf.org |
34 | * @author Hugo Sales <hugo@hsal.es> |
35 | * @copyright 2020-2021 Free Software Foundation, Inc http://www.fsf.org |
36 | * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later |
37 | */ |
38 | class GroupJoinQueue extends Entity |
39 | { |
40 | // {{{ Autocode |
41 | // @codeCoverageIgnoreStart |
42 | private int $gsactor_id; |
43 | private int $group_id; |
44 | |
45 | public function setGSActorId(int $gsactor_id): self |
46 | { |
47 | $this->gsactor_id = $gsactor_id; |
48 | return $this; |
49 | } |
50 | |
51 | public function getGSActorId(): int |
52 | { |
53 | return $this->gsactor_id; |
54 | } |
55 | |
56 | public function setGroupId(int $group_id): self |
57 | { |
58 | $this->group_id = $group_id; |
59 | return $this; |
60 | } |
61 | |
62 | public function getGroupId(): int |
63 | { |
64 | return $this->group_id; |
65 | } |
66 | |
67 | // @codeCoverageIgnoreEnd |
68 | // }}} Autocode |
69 | |
70 | public static function schemaDef(): array |
71 | { |
72 | return [ |
73 | 'name' => 'group_join_queue', |
74 | 'description' => 'Holder for group join requests awaiting moderation.', |
75 | 'fields' => [ |
76 | 'gsactor_id' => ['type' => 'int', 'foreign key' => true, 'target' => 'GSActor.id', 'multiplicity' => 'many to one', 'name' => 'group_join_queue_gsactor_id_fkey', 'not null' => true, 'description' => 'remote or local gsactor making the request'], |
77 | 'group_id' => ['type' => 'int', 'foreign key' => true, 'target' => 'Group.id', 'multiplicity' => 'many to one', 'name' => 'group_join_queue_group_id_fkey', 'not null' => true, 'description' => 'remote or local group to join, if any'], |
78 | ], |
79 | 'primary key' => ['gsactor_id', 'group_id'], |
80 | 'indexes' => [ |
81 | 'group_join_queue_gsactor_id_idx' => ['gsactor_id'], |
82 | 'group_join_queue_group_id_idx' => ['group_id'], |
83 | ], |
84 | ]; |
85 | } |
86 | } |