chg: dev: create the UserStats entity what is a Materialized View to store Profile stats for every user - & massive ProfileController refactor #8
This commit is contained in:
37
src/Dto/ProfileViewDto.php
Normal file
37
src/Dto/ProfileViewDto.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of the SplendidBear Websites' projects.
|
||||
*
|
||||
* Copyright (c) 2026 @ www.splendidbear.org
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Dto;
|
||||
|
||||
/**
|
||||
* Class ProfileViewDto
|
||||
*
|
||||
* @package App\Dto
|
||||
* @author Lang <https://www.splendidbear.org>
|
||||
* @category Class
|
||||
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
|
||||
* @link www.splendidbear.org
|
||||
* @since 2026. 04. 20.
|
||||
*/
|
||||
final readonly class ProfileViewDto
|
||||
{
|
||||
public function __construct(
|
||||
public ProfileStatsDto $stats,
|
||||
public array $recent,
|
||||
public array $gamesData,
|
||||
public ProfileChartDataDto $chartData,
|
||||
) {
|
||||
}
|
||||
|
||||
public function toTemplateContext(): array
|
||||
{
|
||||
return get_object_vars($this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user