1<?php
2
3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
4// See the LICENCE file in the repository root for full licence text.
5
6declare(strict_types=1);
7
8namespace App\Transformers;
9
10use App\Models\Season;
11
12class SeasonTransformer extends TransformerAbstract
13{
14 public function transform(Season $season): array
15 {
16 return [
17 'end_date' => $season->endDate(),
18 'id' => $season->getKey(),
19 'name' => $season->name,
20 'room_count' => $season->rooms()->count(),
21 'start_date' => $season->startDate(),
22 ];
23 }
24}