koel/database/factories/InteractionFactory.php

25 lines
550 B
PHP
Raw Normal View History

<?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> */
public function definition(): array
{
return [
'song_id' => Song::factory(),
'user_id' => User::factory(),
'liked' => $this->faker->boolean,
'play_count' => $this->faker->randomNumber(),
];
}
}