10-04-2026

This commit is contained in:
Kevin Adametz 2026-04-10 17:18:17 +02:00
parent 4d6b4930b2
commit 4bb89aad8c
836 changed files with 52961 additions and 5950 deletions

View file

@ -0,0 +1,48 @@
<?php
namespace Database\Factories;
use App\Models\CabinetTabletSetting;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @template TModel of \App\Models\CabinetTabletSetting
*
* @extends \Illuminate\Database\Eloquent\Factories\Factory<TModel>
*/
class CabinetTabletSettingFactory extends Factory
{
protected $model = CabinetTabletSetting::class;
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'store_status' => 'auto',
'notice_headline' => null,
'notice_subtext' => null,
'override_open_today' => null,
'override_close_today' => null,
'next_appointment_date' => fake()->dateTimeBetween('now', '+7 days'),
'next_appointment_time' => '14:00',
'hours_monday_open' => '10:00',
'hours_monday_close' => '18:00',
'hours_tuesday_open' => '10:00',
'hours_tuesday_close' => '18:00',
'hours_wednesday_open' => '10:00',
'hours_wednesday_close' => '18:00',
'hours_thursday_open' => '10:00',
'hours_thursday_close' => '18:00',
'hours_friday_open' => '10:00',
'hours_friday_close' => '18:00',
'hours_saturday_open' => '10:00',
'hours_saturday_close' => '14:00',
'hours_sunday_open' => null,
'hours_sunday_close' => null,
'contact_phone' => '0521 98620100',
'contact_email' => 'info@cabinet-bielefeld.de',
];
}
}

View file

@ -0,0 +1,59 @@
<?php
namespace Database\Factories;
use App\Models\CmsArticle;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<CmsArticle>
*/
class CmsArticleFactory extends Factory
{
protected $model = CmsArticle::class;
public function definition(): array
{
$title = fake()->sentence(6);
return [
'slug' => Str::slug($title).'-'.fake()->unique()->numberBetween(100, 999),
'title' => $title,
'subtitle' => fake()->sentence(12),
'image' => 'b2in/magazin-'.fake()->numberBetween(1, 5).'.jpg',
'category' => fake()->randomElement(['Dubai Investment', 'Rendite & Einrichtung', 'B2B & Partner', 'Einrichtung & Netzwerk']),
'date_label' => fake()->date('F j, Y'),
'read_time' => fake()->numberBetween(3, 10).' min read',
'author' => [
'name' => fake()->name(),
'bio' => fake()->sentence(15),
'avatar' => 'b2in/marcel-scheibe.jpg',
],
'content' => ['de' => [
'intro' => fake()->paragraph(3),
'sections' => [
['title' => fake()->sentence(5), 'content' => fake()->paragraph(4)],
['title' => fake()->sentence(5), 'content' => fake()->paragraph(4)],
['title' => fake()->sentence(5), 'content' => fake()->paragraph(4)],
],
]],
'is_published' => true,
'order' => 0,
];
}
public function published(): static
{
return $this->state(fn (array $attributes) => [
'is_published' => true,
]);
}
public function unpublished(): static
{
return $this->state(fn (array $attributes) => [
'is_published' => false,
]);
}
}

View file

@ -0,0 +1,80 @@
<?php
namespace Database\Factories;
use App\Models\CmsProject;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<CmsProject>
*/
class CmsProjectFactory extends Factory
{
protected $model = CmsProject::class;
public function definition(): array
{
$title = fake()->words(3, true);
return [
'slug' => Str::slug($title).'-'.fake()->unique()->numberBetween(100, 999),
'title' => ucfirst($title),
'location' => fake()->city().', '.fake()->country(),
'status' => fake()->randomElement(['NEW LAUNCH', 'SOLD OUT', 'AVAILABLE', null]),
'launch_date' => fake()->dateTimeBetween('-1 year', '+1 year'),
'price_from_aed' => fake()->numberBetween(500_000, 10_000_000),
'currency' => 'AED',
'image' => 'expose/placeholder.jpg',
'highlights' => [
fake()->sentence(4),
fake()->sentence(4),
fake()->sentence(4),
],
'quick_facts' => [
['icon' => 'home-modern', 'label' => 'Typen', 'value' => '1BR & 2BR'],
['icon' => 'squares-2x2', 'label' => 'Größe', 'value' => fake()->numberBetween(400, 2000).' sqft'],
['icon' => 'building-office-2', 'label' => 'Einheiten', 'value' => fake()->numberBetween(50, 500)],
['icon' => 'user', 'label' => 'Entwickler', 'value' => fake()->company()],
],
'investment_case' => [
'title' => fake()->sentence(5),
'text' => fake()->paragraph(3),
'views' => [fake()->word(), fake()->word()],
],
'gallery' => [],
'location_info' => [
'title' => 'Location: '.fake()->city(),
'map_url' => 'https://maps.google.com/?q='.urlencode(fake()->city()),
'points' => [
fake()->sentence(6),
fake()->sentence(6),
],
],
'contact' => [
'title' => fake()->sentence(5),
'subtitle' => fake()->sentence(3),
'options' => [
'' => 'Ich interessiere mich für...',
'general' => 'Allgemeine Beratung',
],
],
'is_published' => true,
'order' => 0,
];
}
public function published(): static
{
return $this->state(fn (array $attributes) => [
'is_published' => true,
]);
}
public function unpublished(): static
{
return $this->state(fn (array $attributes) => [
'is_published' => false,
]);
}
}

View file

@ -0,0 +1,35 @@
<?php
namespace Database\Factories;
use App\Models\Display;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @template TModel of \App\Models\Display
*
* @extends \Illuminate\Database\Eloquent\Factories\Factory<TModel>
*/
class DisplayFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var class-string<TModel>
*/
protected $model = Display::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->words(2, true),
'location' => fake()->optional()->words(3, true),
'is_active' => true,
];
}
}

View file

@ -0,0 +1,66 @@
<?php
namespace Database\Factories;
use App\Models\DisplayMedia;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<DisplayMedia>
*/
class DisplayMediaFactory extends Factory
{
protected $model = DisplayMedia::class;
/**
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'filename' => fake()->word().'.webp',
'disk' => 'public',
'path' => 'display-media/test/'.fake()->uuid().'.webp',
'external_url' => null,
'source_type' => 'upload',
'type' => 'image',
'mime_type' => 'image/webp',
'file_size' => fake()->numberBetween(10000, 5000000),
'title' => fake()->sentence(3),
'collection' => fake()->randomElement(['immobilien', 'moebel', 'brand', null]),
'is_active' => true,
];
}
public function video(): static
{
return $this->state(fn () => [
'filename' => fake()->word().'.mp4',
'path' => 'display-media/test/'.fake()->uuid().'.mp4',
'type' => 'video',
'mime_type' => 'video/mp4',
'file_size' => fake()->numberBetween(1000000, 50000000),
]);
}
public function external(): static
{
return $this->state(fn () => [
'filename' => fake()->word().'.jpg',
'disk' => 'public',
'path' => null,
'external_url' => 'https://drive.google.com/file/d/'.fake()->uuid().'/view',
'source_type' => 'external',
'file_size' => 0,
'mime_type' => null,
]);
}
public function externalVideo(): static
{
return $this->external()->state(fn () => [
'filename' => fake()->word().'.mp4',
'type' => 'video',
]);
}
}

View file

@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Enums\DisplayVersionType;
use App\Models\DisplayVersion;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @template TModel of \App\Models\DisplayVersion
*
* @extends \Illuminate\Database\Eloquent\Factories\Factory<TModel>
*/
class DisplayVersionFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var class-string<TModel>
*/
protected $model = DisplayVersion::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->words(3, true),
'type' => DisplayVersionType::VideoDisplay,
'settings' => [],
'is_active' => true,
];
}
}

View file

@ -0,0 +1,42 @@
<?php
namespace Database\Factories;
use App\Models\DisplayVersion;
use App\Models\DisplayVersionItem;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @template TModel of \App\Models\DisplayVersionItem
*
* @extends \Illuminate\Database\Eloquent\Factories\Factory<TModel>
*/
class DisplayVersionItemFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var class-string<TModel>
*/
protected $model = DisplayVersionItem::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'display_version_id' => DisplayVersion::factory(),
'item_type' => 'video',
'content' => [
'filename' => 'test-video.mp4',
'title' => fake()->sentence(3),
'position' => 25,
],
'sort_order' => 0,
'is_active' => true,
];
}
}