Update playlist design

This commit is contained in:
2026-08-04 15:29:39 +02:00
parent 7553b9f895
commit 7f9573fe0f
13 changed files with 632 additions and 132 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Database\Factories;
use App\Models\Episode;
use App\Models\Gallery;
use App\Models\Hentai;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Gallery>
*/
class GalleryFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'hentai_id' => Hentai::factory(),
'episode_id' => Episode::factory(),
'image_url' => $this->faker->url(),
'thumbnail_url' => $this->faker->url(),
];
}
}
@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Episode;
use App\Models\Playlist;
use App\Models\PlaylistEpisode;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<PlaylistEpisode>
*/
class PlaylistEpisodeFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'playlist_id' => Playlist::factory(),
'episode_id' => Episode::factory(),
'position' => $this->faker->numberBetween(1, 1000),
];
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Database\Factories;
use App\Models\Playlist;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Playlist>
*/
class PlaylistFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'user_id' => User::factory(),
'name' => $this->faker->word(),
'is_private' => true,
];
}
}