28 lines
777 B
PHP
28 lines
777 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Event>
|
|
*/
|
|
class EventFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'client_id' => Str::uuid()->toString(),
|
|
'user_id' => User::factory(),
|
|
'title' => fake()->sentence(3),
|
|
'date' => fake()->date(),
|
|
'emotion' => fake()->randomFloat(3, -1, 1),
|
|
'custom_color' => null,
|
|
'gradient_preset' => fake()->optional(0.3)->numberBetween(0, 9),
|
|
'image' => null,
|
|
'note' => fake()->optional(0.5)->sentence(),
|
|
];
|
|
}
|
|
}
|