initial commit

This commit is contained in:
Edward Tirado Jr 2026-02-18 00:15:02 -06:00
commit d96b74e6c1
88 changed files with 15238 additions and 0 deletions

37
app/Data/MovieResult.php Normal file
View file

@ -0,0 +1,37 @@
<?php
namespace App\Data;
use App\Models\Movie;
readonly class MovieResult
{
public function __construct(
public string $imdbId,
public string $title,
public ?int $year,
public ?string $director,
public ?string $actors,
public ?string $plot,
public ?string $genre,
public ?string $mpaaRating,
public ?array $criticScores,
public ?string $poster,
) {}
public static function fromModel(Movie $movie): self
{
return new self(
imdbId: $movie->imdb_id,
title: $movie->title,
year: $movie->year,
director: $movie->director,
actors: $movie->actors,
plot: $movie->plot,
genre: $movie->genre,
mpaaRating: $movie->mpaa_rating,
criticScores: $movie->critic_scores,
poster: $movie->poster,
);
}
}