mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-30 15:30:51 -05:00
40 lines
926 B
PHP
40 lines
926 B
PHP
<?php
|
|
|
|
/* @var \Illuminate\Database\Eloquent\Factory $factory */
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Playlist;
|
|
use App\Models\PlaylistTorrent;
|
|
use App\Models\Torrent;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class PlaylistTorrentFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = PlaylistTorrent::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
'position' => $this->faker->randomNumber(),
|
|
'playlist_id' => function () {
|
|
return Playlist::factory()->create()->id;
|
|
},
|
|
'torrent_id' => function () {
|
|
return Torrent::factory()->create()->id;
|
|
},
|
|
'tmdb_id' => $this->faker->randomNumber(),
|
|
];
|
|
}
|
|
}
|