fix: uses symfony de-normalizer to map tmdb data to objects

This commit is contained in:
2025-09-01 21:01:10 -05:00
parent 662e2600f6
commit b8b71fa5b3
9 changed files with 396 additions and 15 deletions

View File

@@ -2,15 +2,22 @@
namespace App\Tmdb;
use Symfony\Component\Serializer\Attribute\SerializedPath;
class TmdbResult
{
public function __construct(
#[SerializedPath('[external_ids][imdb_id]')]
public ?string $imdbId = "",
public ?string $tmdbId = "",
#[SerializedPath('[id]')]
public ?int $tmdbId = null,
#[SerializedPath('[title]')]
public ?string $title = "",
public ?string $poster = "",
#[SerializedPath('[overview]')]
public ?string $description = "",
public ?string $year = "",
public ?string $poster = "",
public ?\DateTimeInterface $premiereDate = null,
public ?string $year = null,
public ?string $mediaType = "",
public ?array $episodes = null,
public ?string $episodeAirDate = null,