<?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;

use JsonSerializable;

/**
 * Class ProfileGameDto
 *
 * @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 ProfileGameDto implements JsonSerializable
{
    public function __construct(
        public ?int    $id,
        public ?string $uuid,
        public string  $redName,
        public string  $blueName,
        public ?string $redAvatar,
        public ?string $blueAvatar,
        public ?int    $redPoints,
        public ?int    $bluePoints,
        public ?bool   $redExplodedBomb,
        public ?bool   $blueExplodedBomb,
        public ?string $resign,
        public ?string $created,
        public ?string $date,
        public bool    $isRed,
        public string  $result,
        public ?int    $myPoints,
        public ?int    $oppPoints,
        public float   $redBonusPoints,
        public float   $blueBonusPoints,
        public array   $redBonusStats,
        public array   $blueBonusStats,
        public bool    $bothRegistered,
    ) {
    }

    public function jsonSerialize(): array
    {
        return get_object_vars($this);
    }
}
