25-02-2025
This commit is contained in:
parent
98084de7d0
commit
70a7776da5
53 changed files with 6719 additions and 833 deletions
28
backend/database/factories/EventFactory.php
Normal file
28
backend/database/factories/EventFactory.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue