|
1 | 1 | <?php declare(strict_types=1);
|
2 | 2 | namespace App\Entity;
|
3 | 3 |
|
| 4 | +use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; |
4 | 5 | use Doctrine\ORM\Mapping as ORM;
|
5 | 6 |
|
6 | 7 | /**
|
|
18 | 19 | #[ORM\Index(columns: ['cid', 'points_public', 'totaltime_public', 'totalruntime_public'], name: 'order_public')]
|
19 | 20 | #[ORM\Index(columns: ['cid'], name: 'cid')]
|
20 | 21 | #[ORM\Index(columns: ['teamid'], name: 'teamid')]
|
| 22 | +#[ORM\Index(columns: ['sort_key_public'], name: 'sortKeyPublic')] |
| 23 | +#[ORM\Index(columns: ['sort_key_restricted'], name: 'sortKeyRestricted')] |
21 | 24 | class RankCache
|
22 | 25 | {
|
23 | 26 | #[ORM\Column(options: [
|
@@ -62,6 +65,20 @@ class RankCache
|
62 | 65 | #[ORM\JoinColumn(name: 'teamid', referencedColumnName: 'teamid', onDelete: 'CASCADE')]
|
63 | 66 | private Team $team;
|
64 | 67 |
|
| 68 | + #[ORM\Column( |
| 69 | + type: 'text', |
| 70 | + length: AbstractMySQLPlatform::LENGTH_LIMIT_TEXT, |
| 71 | + options: ['comment' => 'Opaque sort key for public audience.', 'default' => ''] |
| 72 | + )] |
| 73 | + private string $sortKeyPublic = ''; |
| 74 | + |
| 75 | + #[ORM\Column( |
| 76 | + type: 'text', |
| 77 | + length: AbstractMySQLPlatform::LENGTH_LIMIT_TEXT, |
| 78 | + options: ['comment' => 'Opaque sort key for restricted audience.', 'default' => ''] |
| 79 | + )] |
| 80 | + private string $sortKeyRestricted = ''; |
| 81 | + |
65 | 82 | public function setPointsRestricted(int $pointsRestricted): RankCache
|
66 | 83 | {
|
67 | 84 | $this->points_restricted = $pointsRestricted;
|
@@ -149,4 +166,26 @@ public function getTeam(): Team
|
149 | 166 | {
|
150 | 167 | return $this->team;
|
151 | 168 | }
|
| 169 | + |
| 170 | + public function setSortKeyPublic(string $sortKeyPublic): RankCache |
| 171 | + { |
| 172 | + $this->sortKeyPublic = $sortKeyPublic; |
| 173 | + return $this; |
| 174 | + } |
| 175 | + |
| 176 | + public function getSortKeyPublic(): string |
| 177 | + { |
| 178 | + return $this->sortKeyPublic; |
| 179 | + } |
| 180 | + |
| 181 | + public function setSortKeyRestricted(string $sortKeyRestricted): RankCache |
| 182 | + { |
| 183 | + $this->sortKeyRestricted = $sortKeyRestricted; |
| 184 | + return $this; |
| 185 | + } |
| 186 | + |
| 187 | + public function getSortKeyRestricted(): string |
| 188 | + { |
| 189 | + return $this->sortKeyRestricted; |
| 190 | + } |
152 | 191 | }
|
0 commit comments