Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 369
0.00% covered (danger)
0.00%
0 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
OlzTerminDetailParams
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
OlzTerminDetail
0.00% covered (danger)
0.00%
0 / 369
0.00% covered (danger)
0.00%
0 / 6
4032
0.00% covered (danger)
0.00%
0 / 1
 hasAccess
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 searchSqlWhenHasAccess
0.00% covered (danger)
0.00%
0 / 35
0.00% covered (danger)
0.00%
0 / 1
6
 getPageTitle
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getPageDescription
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getHtmlWhenHasAccess
0.00% covered (danger)
0.00%
0 / 326
0.00% covered (danger)
0.00%
0 / 1
3306
 getTerminById
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Olz\Termine\Components\OlzTerminDetail;
4
5use Doctrine\Common\Collections\Criteria;
6use Olz\Common\Components\OlzEventData\OlzEventData;
7use Olz\Common\Components\OlzFooter\OlzFooter;
8use Olz\Common\Components\OlzHeader\OlzHeader;
9use Olz\Common\Components\OlzLocationMap\OlzLocationMap;
10use Olz\Common\Components\OlzRootComponent;
11use Olz\Common\Utils\HttpParams;
12use Olz\Entity\News\NewsEntry;
13use Olz\Entity\Termine\Termin;
14use Olz\Entity\Termine\TerminLabel;
15use Olz\Entity\Termine\TerminNotification;
16use Olz\News\Components\OlzNewsListItem\OlzNewsListItem;
17use Olz\Termine\Components\OlzTermineListItem\OlzTermineListItem;
18use Olz\Users\Components\OlzUserInfoModal\OlzUserInfoModal;
19
20/** @extends HttpParams<array{von?: ?string}> */
21class OlzTerminDetailParams extends HttpParams {
22}
23
24/** @extends OlzRootComponent<array<string, mixed>> */
25class OlzTerminDetail extends OlzRootComponent {
26    public function hasAccess(): bool {
27        return true;
28    }
29
30    public function searchSqlWhenHasAccess(array $terms): string|array|null {
31        $code_href = $this->envUtils()->getCodeHref();
32        $today_iso = $this->dateUtils()->getIsoToday();
33        $where = implode(' AND ', array_map(function ($term) {
34            $date_sql = '';
35            $term_date_range = $this->dateUtils()->parseDateTimeRange($term);
36            if ($term_date_range !== null) {
37                $query_start = $term_date_range['start']->format('Y-m-d');
38                $query_end = $term_date_range['end']->format('Y-m-d');
39                $date_sql = <<<ZZZZZZZZZZ
40                    OR (
41                        t.start_date < '{$query_end}'
42                        AND IFNULL(t.end_date, t.start_date) >= '{$query_start}'
43                    )
44                    ZZZZZZZZZZ;
45            }
46            return <<<ZZZZZZZZZZ
47                (
48                    t.title LIKE '%{$term}%'
49                    OR t.text LIKE '%{$term}%'
50                    OR tl.name LIKE '%{$term}%'
51                    {$date_sql}
52                )
53                ZZZZZZZZZZ;
54        }, $terms));
55        return [
56            'with' => [
57                <<<ZZZZZZZZZZ
58                    base_termine AS (
59                        SELECT
60                            CONCAT('{$code_href}termine/', t.id) AS link,
61                            '{$code_href}assets/icns/termine_type_all_20.svg' AS icon,
62                            t.start_date AS date,
63                            CONCAT('Termin: ', t.title) AS title,
64                            CONCAT(IFNULL(tl.name, ''), ' ', IFNULL(t.text, ''), ' Typ: ', (
65                                SELECT GROUP_CONCAT(l.name ORDER BY l.position ASC SEPARATOR ', ')
66                                FROM
67                                    termin_label_map tlm
68                                    JOIN termin_labels l ON (l.id = tlm.label_id)
69                                WHERE tlm.termin_id = t.id
70                                GROUP BY t.id
71                            )) AS text,
72                            DATEDIFF(t.start_date, '{$today_iso}') AS diffdays
73                        FROM termine t LEFT JOIN termin_locations tl ON (t.location_id = tl.id)
74                        WHERE
75                            t.deleted_at IS NULL
76                            AND {$this->termineUtils()->getIsNotArchivedSql('t')}
77                            AND {$where}
78                    )
79                    ZZZZZZZZZZ,
80            ],
81            'query' => <<<'ZZZZZZZZZZ'
82                SELECT
83                    link, icon, date, title, text,
84                    CASE
85                        WHEN diffdays < -30 THEN 0.7
86                        WHEN diffdays <= 0 THEN 1.0 + diffdays * 0.3 / 30.0
87                        WHEN diffdays < 100 THEN 1.0
88                        WHEN diffdays < 400 THEN 1.0 - (diffdays - 100) * 0.3 / 300.0
89                        ELSE 0.7
90                    END AS time_relevance
91                FROM base_termine
92                ZZZZZZZZZZ,
93        ];
94    }
95
96    public function getPageTitle(): string {
97        return "";
98    }
99
100    public function getPageDescription(): string {
101        return "";
102    }
103
104    public function getHtmlWhenHasAccess(mixed $args): string {
105        $this->httpUtils()->validateGetParams(OlzTerminDetailParams::class);
106
107        $code_href = $this->envUtils()->getCodeHref();
108        $code_path = $this->envUtils()->getCodePath();
109        $data_path = $this->envUtils()->getDataPath();
110        $date_utils = $this->dateUtils();
111        $today = $date_utils->getIsoToday();
112        $entityManager = $this->dbUtils()->getEntityManager();
113        $user = $this->authUtils()->getCurrentUser();
114        $is_member = $this->authUtils()->hasPermission('termine') || ($user?->isMember() ?? false);
115        $id = $args['id'] ?? null;
116
117        $termin_repo = $entityManager->getRepository(Termin::class);
118        $is_not_archived = $this->termineUtils()->getIsNotArchivedCriteria();
119        $criteria = Criteria::create()
120            ->where(Criteria::expr()->andX(
121                $is_not_archived,
122                Criteria::expr()->eq('id', $id),
123                Criteria::expr()->isNull('deleted_at'),
124            ))
125            ->setFirstResult(0)
126            ->setMaxResults(1)
127        ;
128        $termine = $termin_repo->matching($criteria);
129        $num_termine = $termine->count();
130        $is_archived = $num_termine !== 1;
131
132        if ($is_archived && !$this->authUtils()->hasPermission('any')) {
133            $this->httpUtils()->dieWithHttpError(404);
134            throw new \Exception('should already have failed');
135        }
136
137        $termin = $this->getTerminById($id);
138
139        if (!$termin) {
140            $this->httpUtils()->dieWithHttpError(404);
141            throw new \Exception('should already have failed');
142        }
143
144        $title = $termin->getTitle() ?? '';
145        $termin_year = $termin->getStartDate()->format('Y');
146        $this_year = $this->dateUtils()->getCurrentDateInFormat('Y');
147        $maybe_date = ($termin_year !== $this_year) ? " {$termin_year}" : '';
148        $title = "{$title}{$maybe_date}";
149        $text = $termin->getText() ?? '';
150        $parent_termin = $termin->getParentTermin();
151        $back_link = $parent_termin
152            ? "{$code_href}termine/{$parent_termin->getId()}"
153            : "{$code_href}termine";
154        $out = OlzHeader::render([
155            'back_link' => $back_link,
156            'title' => "{$title} - Termine",
157            'description' => "{$text}",
158            'norobots' => $is_archived,
159            'canonical_url' => "{$code_href}termine/{$id}",
160        ]);
161
162        $out .= "<div class='content-full'>";
163
164        $start_date = $termin->getStartDate();
165        $end_date = $termin->getEndDate() ?? null;
166        $start_time = $termin->getStartTime() ?? null;
167        $end_time = $termin->getEndTime() ?? null;
168        $organizer = $termin->getOrganizerUser();
169        $labels = [...$termin->getLabels()];
170        $latitude = $termin->getLatitude() ?? 0;
171        $longitude = $termin->getLongitude() ?? 0;
172        $solv_uid = $termin->getSolvId();
173        $termin_location = $termin->getLocation();
174        $has_olz_location = ($latitude > 0 && $longitude > 0);
175        $has_termin_location = (
176            $termin_location
177            && $termin_location->getLatitude() > 0
178            && $termin_location->getLongitude() > 0
179        );
180        $lat = null;
181        $lng = null;
182        $location_name = null;
183        if ($has_termin_location) {
184            $lat = $termin_location->getLatitude();
185            $lng = $termin_location->getLongitude();
186            $location_name = $termin_location->getName();
187        }
188        if ($has_olz_location) {
189            $lat = $latitude;
190            $lng = $longitude;
191            $location_name = null;
192        }
193        $has_location = $has_olz_location || $has_termin_location;
194        $image_ids = $termin->getImageIds();
195
196        $out .= OlzEventData::render([
197            'name' => $title,
198            'start_date' => $date_utils->olzDate('jjjj-mm-tt', $start_date),
199            'end_date' => $end_date ? $date_utils->olzDate('jjjj-mm-tt', $end_date) : null,
200            'location' => $has_location ? [
201                'lat' => $lat,
202                'lng' => $lng,
203                'name' => $location_name,
204            ] : null,
205        ]);
206
207        $out .= "<div class='olz-termin-detail'>";
208
209        if ($parent_termin) {
210            $out .= "<div class='parent-termin-container'>";
211            $out .= OlzTermineListItem::render([
212                'id' => $parent_termin->getId(),
213                'owner_user_id' => $parent_termin->getOwnerUser()?->getId(),
214                'start_date' => $parent_termin->getStartDate()->format('Y-m-d'),
215                'start_time' => $parent_termin->getStartTime()?->format('H:i:s'),
216                'end_date' => $parent_termin->getEndDate()?->format('Y-m-d'),
217                'end_time' => $parent_termin->getEndTime()?->format('H:i:s'),
218                'organizer_user_id' => $parent_termin->getOrganizerUser()?->getId(),
219                'title' => $parent_termin->getTitle(),
220                'text' => $parent_termin->getText(),
221                'labels' => $parent_termin->getLabels(),
222                'image_ids' => $parent_termin->getImageIds(),
223                'location_id' => $parent_termin->getLocation()?->getId(),
224            ]);
225            $out .= "</div>";
226        }
227
228        $out .= "<div class='preview'>";
229        // Bild anzeigen
230        if (count($image_ids) > 0) {
231            $out .= $this->imageUtils()->olzImage(
232                'termine',
233                $id,
234                $image_ids[0],
235                840
236            );
237        // Karte zeigen
238        } elseif ($has_location) {
239            $out .= OlzLocationMap::render([
240                'latitude' => $lat,
241                'longitude' => $lng,
242                'zoom' => 13,
243            ]);
244        }
245        // Date & Title
246        $pretty_date = $this->dateUtils()->formatDateTimeRange(
247            $start_date->format('Y-m-d'),
248            $start_time?->format('H:i:s'),
249            $end_date?->format('Y-m-d'),
250            $end_time?->format('H:i:s'),
251            $format = 'long',
252        );
253        $out .= "<div class='title-date-container'>";
254        $esc_title = htmlspecialchars($title);
255        $out .= "<h1>{$esc_title}</h1>";
256        $out .= "<h4>{$pretty_date}</h4>";
257        $out .= "</div>";
258
259        // Editing Tools
260        $is_owner = $user && intval($termin->getOwnerUser()?->getId() ?? 0) === intval($user->getId());
261        $is_organizer = $user && intval($termin->getOrganizerUser()?->getId() ?? 0) === intval($user->getId());
262        $has_termine_permissions = $this->authUtils()->hasPermission('termine');
263        $can_edit = $is_owner || $is_organizer || $has_termine_permissions;
264        $add_termin_notification_admin = '';
265        if ($can_edit) {
266            $json_id = json_encode($id);
267            $out .= <<<ZZZZZZZZZZ
268                <div class='actions-container'>
269                    <button
270                        id='edit-termin-button'
271                        class='btn btn-auth'
272                        onclick='return olz.editTermin({$json_id})'
273                    >
274                        <img src='{$code_href}assets/icns/edit_16.svg' class='noborder' />
275                        Bearbeiten
276                    </button>
277                </div>
278                ZZZZZZZZZZ;
279            $add_termin_notification_admin = <<<ZZZZZZZZZZ
280                <div>
281                    <button
282                        id='add-termin-notification-button'
283                        class='btn btn-auth btn-sm'
284                        onclick='return olz.addTerminNotification({$json_id})'
285                    >
286                        <img src='{$code_href}assets/icns/new_16.svg' class='noborder' />
287                        Neue Benachrichtigung
288                    </button>
289                </div>
290                ZZZZZZZZZZ;
291        }
292
293        $out .= "</div>"; // preview
294
295        $labels_html = implode('', array_map(function (TerminLabel $label) use ($code_path, $code_href) {
296            $ident = $label->getIdent();
297            $serialized_filter = $this->termineUtils()->serialize([
298                'typ' => $ident,
299                'datum' => 'bevorstehend',
300            ]);
301            // TODO: Remove fallback mechanism?
302            $fallback_path = "{$code_path}assets/icns/termine_type_{$ident}_20.svg";
303            $fallback_href = is_file($fallback_path)
304                ? "{$code_href}assets/icns/termine_type_{$ident}_20.svg" : null;
305            $icon_href = $label->getIcon() ? $label->getFileHref($label->getIcon()) : $fallback_href;
306            $esc_name = htmlspecialchars($label->getName());
307            return $icon_href ? <<<ZZZZZZZZZZ
308                <a href='{$code_href}termine?filter={$serialized_filter}' class='filter'>
309                    <img src='{$icon_href}' alt='' class='type-icon'>{$esc_name}
310                </a>
311                ZZZZZZZZZZ : '';
312        }, $labels));
313        $out .= "<div class='filters'>{$labels_html}</div>";
314
315        if ($organizer) {
316            $pretty_organizer = OlzUserInfoModal::render(['user' => $organizer]);
317            $out .= "<div>Organisator: {$pretty_organizer}</div><br>";
318        }
319
320        if ($solv_uid) {
321            // SOLV-Übersicht-Link zeigen
322            $out .= "<h4><a href='https://www.o-l.ch/cgi-bin/fixtures?&mode=show&unique_id={$solv_uid}' target='_blank' class='linkol'>O-L.ch</a></h4>\n";
323        }
324
325        $sub_termine = $termin_repo->findBy(['parent_termin' => $termin], [
326            'start_date' => 'ASC',
327            'start_time' => 'ASC',
328        ]);
329        foreach ($sub_termine as $sub_termin) {
330            $out .= OlzTermineListItem::render([
331                'id' => $sub_termin->getId(),
332                'owner_user_id' => $sub_termin->getOwnerUser()?->getId(),
333                'start_date' => $sub_termin->getStartDate()->format('Y-m-d'),
334                'start_time' => $sub_termin->getStartTime()?->format('H:i:s'),
335                'end_date' => $sub_termin->getEndDate()?->format('Y-m-d'),
336                'end_time' => $sub_termin->getEndTime()?->format('H:i:s'),
337                'organizer_user_id' => $sub_termin->getOrganizerUser()?->getId(),
338                'title' => $sub_termin->getTitle(),
339                'text' => $sub_termin->getText(),
340                'labels' => $sub_termin->getLabels(),
341                'image_ids' => $sub_termin->getImageIds(),
342                'location_id' => $sub_termin->getLocation()?->getId(),
343            ]);
344        }
345
346        // Text
347        $text_html = $this->htmlUtils()->renderMarkdown($text, [
348            // TODO: Do NOT ever allow!
349            'html_input' => $start_date->format('Y') > '2020' ? 'escape' : 'allow',
350        ]);
351        $text_html = $termin->replaceImagePaths($text_html);
352        $text_html = $termin->replaceFilePaths($text_html);
353        if ($termin->getDeadline() && $termin->getDeadline() != "0000-00-00") {
354            $text_html .= ($text_html == "" ? "" : "<br />")."Meldeschluss: ".$date_utils->olzDate("t. MM ", $termin->getDeadline());
355        }
356        $out .= "<div class='text'>".$text_html."</div>";
357
358        // Link
359        $link = '';
360        if ($solv_uid && $start_date->format('Y-m-d') <= $today && !preg_match('/(Rangliste|Resultat)/', $link)) {
361            // SOLV Ranglisten-Link zeigen
362            $link .= "<div><a href='http://www.o-l.ch/cgi-bin/results?unique_id={$solv_uid}&club=zimmerberg' target='_blank' class='linkol'>Rangliste</a></div>\n";
363        }
364        $result_filename = "{$termin_year}-termine-{$id}.xml";
365        if (is_file("{$data_path}results/{$result_filename}")) {
366            // OLZ Ranglisten-Link zeigen
367            $link .= "<div><a href='{$code_href}apps/resultate?file={$result_filename}' target='_blank' class='linkext'>Ranglisten</a></div>\n";
368        } elseif ($can_edit) {
369            // OLZ Rangliste-hochladen-Link zeigen
370            $link .= "<div><a href='{$code_href}apps/resultate?file={$result_filename}' target='_blank' class='linkext'>Rangliste hochladen</a></div>\n";
371        }
372        $link = str_replace("&", "&amp;", str_replace("&amp;", "&", $link));
373        $link = str_replace("www.solv.ch", "www.o-l.ch", $link);
374        $out .= "<div class='links'>".$link."</div>";
375
376        // Documentation
377        $documentation = $termin->getDocumentation() ?? '';
378        if ($is_member && $documentation !== '') {
379            $documentation_html = $this->htmlUtils()->renderMarkdown($documentation);
380            $documentation_html = $termin->replaceImagePaths($documentation_html);
381            $documentation_html = $termin->replaceFilePaths($documentation_html);
382            $out .= <<<ZZZZZZZZZZ
383                <div class='documentation auth-section'>
384                    <h2>Dokumentation (nur für OLZ-Mitglieder sichtbar)</h2>
385                    {$documentation_html}
386                </div>
387                ZZZZZZZZZZ;
388        }
389
390        // Karte zeigen
391        if ($has_location) {
392            if ($location_name !== null) {
393                $esc_location_name = htmlspecialchars($location_name);
394                $location_maybe_link = $esc_location_name;
395                if ($this->authUtils()->hasPermission('termine')) {
396                    $location_maybe_link = "<a href='{$code_href}termine/orte/{$termin_location->getId()}' class='linkmap'>{$esc_location_name}</a>";
397                }
398                $out .= "<h3>Ort: {$location_maybe_link}</h3>";
399            } else {
400                $out .= "<h3>Ort</h3>";
401            }
402            $out .= OlzLocationMap::render([
403                'name' => $location_name ?? '',
404                'latitude' => $lat,
405                'longitude' => $lng,
406                'zoom' => 13,
407            ]);
408            if ($has_termin_location) {
409                $details = $termin_location->getDetails() ?? '';
410                $details_html = $this->htmlUtils()->renderMarkdown($details);
411                $details_html = $termin_location->replaceImagePaths($details_html);
412                $details_html = $termin_location->replaceFilePaths($details_html);
413                $out .= $details_html;
414
415                $location_image_ids = $termin_location->getImageIds();
416                if (count($location_image_ids) > 0) {
417                    $out .= "<div class='lightgallery gallery-container'>";
418                    foreach ($location_image_ids as $image_id) {
419                        $out .= "<div class='gallery-image'>";
420                        $out .= $this->imageUtils()->olzImage(
421                            'termin_locations',
422                            $termin_location->getId(),
423                            $image_id,
424                            128,
425                            'gallery[myset]'
426                        );
427                        $out .= "</div>";
428                    }
429                    $out .= "</div>";
430                }
431            }
432        }
433
434        // Reactions
435        $json_id = json_encode($id);
436        $linked_reactions = $this->htmlUtils()->getLinkedReactions($text_html);
437        $json_reactions = json_encode($linked_reactions) ?: '[]';
438        $out .= "<div id='termin-reactions'></div><script>olz.initTerminReactions({$json_id}, {$json_reactions});</script>";
439
440        // News
441        $has_blog = $this->authUtils()->hasPermission('kaderblog', $user);
442        $has_roles = !empty($this->authUtils()->getAuthenticatedRoles());
443        $json_mode = htmlentities(json_encode($has_roles ? ($has_blog ? 'account_with_all' : 'account_with_aktuell') : ($has_blog ? 'account_with_blog' : 'account')) ?: '');
444        $add_termin_news_admin = '';
445        if ($this->authUtils()->hasPermission('any')) {
446            $add_termin_news_admin = <<<ZZZZZZZZZZ
447                <button
448                    id='add-termin-news-button'
449                    class='btn btn-auth btn-sm'
450                    onclick='return olz.addTerminNewsEntry({$json_id}, {$json_mode})'
451                >
452                    <img src='{$code_href}assets/icns/new_16.svg' class='noborder' />
453                    Neuer News-Eintrag
454                </button>
455                ZZZZZZZZZZ;
456        }
457        $out .= "<div id='termin-news'>";
458        $news_repo = $this->entityManager()->getRepository(NewsEntry::class);
459        $news_entries = $news_repo->findBy(
460            ['termin' => $termin],
461            [
462                'published_date' => 'DESC',
463                'published_time' => 'DESC',
464            ],
465        );
466        $num_news_entries = count($news_entries);
467        $out .= $add_termin_news_admin;
468        if ($num_news_entries === 0) {
469            $out .= "<p><i>Keine News-Einträge</i></p>";
470        } else {
471            foreach ($news_entries as $news_entry) {
472                $out .= OlzNewsListItem::render([
473                    'json_mode' => $json_mode,
474                    'news_entry' => $news_entry,
475                ]);
476            }
477        }
478        $out .= "</div>";
479
480        // Termin Notifications
481        if ($can_edit) {
482            $termin_notification_repo = $this->entityManager()->getRepository(TerminNotification::class);
483            $termin_notifications = $termin_notification_repo->findBy(
484                ['termin' => $termin],
485                ['fires_earlier_seconds' => 'DESC'],
486            );
487            $num_termin_notifications = count($termin_notifications);
488            $out .= "<div id='termin-notifications'>";
489            if ($num_termin_notifications === 0) {
490                $out .= "<p><i>Keine Benachrichtigungen</i></p>";
491                $out .= $add_termin_notification_admin;
492            } else {
493                $out .= $add_termin_notification_admin;
494                $out .= "<table id='termin-notifications-table' class='boxy'>";
495                $out .= "<tr><th>Zeitpunkt</th><th>Titel</th><th>Empfänger</th></tr>";
496                foreach ($termin_notifications as $termin_notification) {
497                    $out .= "<tr class='termin-notification'>";
498                    $json_id = json_encode(intval($termin_notification->getId()));
499                    $row_admin = <<<ZZZZZZZZZZ
500                        <button
501                            id='edit-termin-notification-button-{$json_id}'
502                            class='btn btn-outline-auth btn-sm edit-termin-notification-button'
503                            onclick='return olz.editTerminNotification({$json_id})'
504                        >
505                            <img src='{$code_href}assets/icns/edit_16.svg' class='noborder' />
506                        </button>
507                        ZZZZZZZZZZ;
508                    $pretty_fires_earlier = $this->dateUtils()->formatDateInterval(
509                        $termin_notification->getFiresEarlierSeconds()
510                    );
511                    $pretty_recipients = implode('', array_map(
512                        fn ($recipient) => "<div>".htmlspecialchars($recipient)."</div>",
513                        $this->termineUtils()->formatNotificationRecipients($termin_notification),
514                    ));
515                    $out .= "<td>{$row_admin}{$pretty_fires_earlier} vorher</td>";
516                    $out .= "<td><b>".htmlspecialchars($termin_notification->getTitle())."</b></td>";
517                    $out .= "<td>{$pretty_recipients}</td>";
518                    $out .= "</tr>";
519                }
520                $out .= "</table>";
521            }
522            $out .= "</div>";
523        }
524
525        $out .= "</div>"; // olz-termin-detail
526        $out .= "</div>"; // content-full
527
528        $out .= OlzFooter::render();
529
530        return $out;
531    }
532
533    protected function getTerminById(int $id): ?Termin {
534        $termin_repo = $this->entityManager()->getRepository(Termin::class);
535        return $termin_repo->findOneBy([
536            'id' => $id,
537            'deleted_at' => null,
538        ]);
539    }
540}