mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 15:37:53 +00:00
feat: add plugin model
initial implementation of playlist feat: added support for playlists
This commit is contained in:
parent
276511fc98
commit
4195269414
17 changed files with 669 additions and 15 deletions
28
database/factories/PlaylistItemFactory.php
Normal file
28
database/factories/PlaylistItemFactory.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Playlist;
|
||||
use App\Models\PlaylistItem;
|
||||
use App\Models\Plugin;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class PlaylistItemFactory extends Factory
|
||||
{
|
||||
protected $model = PlaylistItem::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'order' => $this->faker->randomNumber(),
|
||||
'is_active' => $this->faker->boolean(),
|
||||
'last_displayed_at' => Carbon::now(),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
|
||||
'playlist_id' => Playlist::factory(),
|
||||
'plugin_id' => Plugin::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue