2020-11-14 16:57:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\Interaction;
|
|
|
|
use App\Models\Song;
|
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
class InteractionFactory extends Factory
|
|
|
|
{
|
|
|
|
protected $model = Interaction::class;
|
|
|
|
|
2020-12-22 20:11:22 +00:00
|
|
|
/** @return array<mixed> */
|
2020-11-14 16:57:25 +00:00
|
|
|
public function definition(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'song_id' => Song::factory(),
|
|
|
|
'user_id' => User::factory(),
|
2024-01-09 18:34:40 +00:00
|
|
|
'liked' => $this->faker->boolean(),
|
2020-11-14 16:57:25 +00:00
|
|
|
'play_count' => $this->faker->randomNumber(),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|