APP als Hybrid Version - Anbindung an API
This commit is contained in:
parent
d054732bf5
commit
c1514999be
46 changed files with 3418 additions and 196 deletions
44
backend/database/factories/EventMediaFactory.php
Normal file
44
backend/database/factories/EventMediaFactory.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Event;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\EventMedia>
|
||||
*/
|
||||
class EventMediaFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$user = User::factory();
|
||||
|
||||
return [
|
||||
'uuid' => (string) Str::uuid(),
|
||||
'user_id' => $user,
|
||||
'event_id' => Event::factory()->for($user),
|
||||
'collection' => 'gallery',
|
||||
'name' => fake()->word().'.jpg',
|
||||
'mime_type' => 'image/jpeg',
|
||||
'disk' => 'local',
|
||||
'path' => 'event-media/test/original.jpg',
|
||||
'thumbnail_path' => 'event-media/test/thumb.jpg',
|
||||
'preview_path' => 'event-media/test/preview.jpg',
|
||||
'size' => 12345,
|
||||
'width' => 1200,
|
||||
'height' => 800,
|
||||
'thumbnail_width' => 320,
|
||||
'thumbnail_height' => 320,
|
||||
'preview_width' => 900,
|
||||
'preview_height' => 600,
|
||||
];
|
||||
}
|
||||
}
|
||||
33
backend/database/factories/UserSettingFactory.php
Normal file
33
backend/database/factories/UserSettingFactory.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\UserSetting>
|
||||
*/
|
||||
class UserSettingFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => User::factory(),
|
||||
'settings' => [
|
||||
'appearance' => 'system',
|
||||
'accentColor' => 'base',
|
||||
'language' => 'de',
|
||||
'timelineZoom' => 1,
|
||||
'timelineScrollLeft' => null,
|
||||
'presets' => [],
|
||||
'activePresetId' => null,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue