Files
UNIT3D-Community-Edition/database/factories/TmdbEpisodeFactory.php
Roardom ae33c74f2b refactor: prefix tmdb metadata models with tmdb
Will help for when there exists other metadata sources available (such as already done for igdb)

Step 4 in cleaner meta fetching code.
2025-03-17 20:41:01 +00:00

52 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author HDVinnie <hdinnovations@protonmail.com>
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
namespace Database\Factories;
use App\Models\TmdbSeason;
use Illuminate\Database\Eloquent\Factories\Factory;
use App\Models\TmdbEpisode;
/** @extends Factory<TmdbEpisode> */
class TmdbEpisodeFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*/
protected $model = TmdbEpisode::class;
/**
* Define the model's default state.
*/
public function definition(): array
{
return [
'name' => $this->faker->name(),
'overview' => $this->faker->text(),
'production_code' => $this->faker->word(),
'season_number' => $this->faker->randomNumber(),
'tmdb_season_id' => TmdbSeason::factory(),
'still' => $this->faker->word(),
'tmdb_tv_id' => $this->faker->randomDigitNotNull(),
'type' => $this->faker->word(),
'vote_average' => $this->faker->word(),
'vote_count' => $this->faker->randomNumber(),
'air_date' => $this->faker->word(),
'episode_number' => $this->faker->randomNumber(),
];
}
}