Introduced a two-tier media pipeline with dynamic disks, asset tracking, admin controls, and alerting around
upload/archival workflows.
- Added storage metadata + asset tables and models so every photo/variant knows where it lives
(database/migrations/2025_10_20_090000_create_media_storage_targets_table.php, database/ migrations/2025_10_20_090200_create_event_media_assets_table.php, app/Models/MediaStorageTarget.php:1, app/
Models/EventMediaAsset.php:1, app/Models/EventStorageAssignment.php:1, app/Models/Event.php:27).
- Rewired guest and tenant uploads to pick the event’s hot disk, persist EventMediaAsset records, compute
checksums, and clean up on delete (app/Http/Controllers/Api/EventPublicController.php:243, app/Http/
Controllers/Api/Tenant/PhotoController.php:25, app/Models/Photo.php:25).
- Implemented storage services, archival job scaffolding, monitoring config, and queue-failure notifications for upload issues (app/Services/Storage/EventStorageManager.php:16, app/Services/Storage/
StorageHealthService.php:9, app/Jobs/ArchiveEventMediaAssets.php:16, app/Providers/AppServiceProvider.php:39, app/Notifications/UploadPipelineFailed.php:8, config/storage-monitor.php:1).
- Seeded default hot/cold targets and exposed super-admin tooling via a Filament resource and capacity widget (database/seeders/MediaStorageTargetSeeder.php:13, database/seeders/DatabaseSeeder.php:17, app/Filament/Resources/MediaStorageTargetResource.php:1, app/Filament/Widgets/StorageCapacityWidget.php:12, app/Providers/Filament/SuperAdminPanelProvider.php:47).
- Dropped cron skeletons and artisan placeholders to schedule storage monitoring, archival dispatch, and upload queue health checks (cron/storage_monitor.sh, cron/archive_dispatcher.sh, cron/upload_queue_health.sh, routes/console.php:9).
248 lines
14 KiB
PHP
248 lines
14 KiB
PHP
<?php
|
||
|
||
namespace Database\Seeders;
|
||
|
||
use Illuminate\Database\Seeder;
|
||
use App\Models\Package;
|
||
use App\Enums\PackageType;
|
||
|
||
class PackageSeeder extends Seeder
|
||
{
|
||
/**
|
||
* Run the database seeds.
|
||
*/
|
||
public function run(): void
|
||
{
|
||
$packages = [
|
||
|
||
[
|
||
'slug' => 'starter',
|
||
'name' => 'Starter',
|
||
'name_translations' => [
|
||
'de' => 'Starter',
|
||
'en' => 'Starter',
|
||
],
|
||
'type' => PackageType::ENDCUSTOMER,
|
||
'price' => 29.00,
|
||
'max_photos' => 300,
|
||
'max_guests' => 50,
|
||
'gallery_days' => 14,
|
||
'max_tasks' => 30,
|
||
'watermark_allowed' => true,
|
||
'branding_allowed' => false,
|
||
'features' => ['basic_uploads', 'limited_sharing', 'custom_tasks'],
|
||
'description' => <<<TEXT
|
||
Ideal für Geburtstage, Gartenpartys oder Polterabende! {{max_guests}} Gäste teilen ihre besten Schnappschüsse, lösen {{max_tasks}} Fotoaufgaben und haben {{gallery_duration}} Zugriff auf die Online-Galerie. {{max_photos}} Bilder sind inklusive – genug Platz für jede Menge Lieblingsmomente.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Ideal für Geburtstage, Gartenpartys oder Polterabende! {{max_guests}} Gäste teilen ihre besten Schnappschüsse, lösen {{max_tasks}} Fotoaufgaben und haben {{gallery_duration}} Zugriff auf die Online-Galerie. {{max_photos}} Bilder sind inklusive – genug Platz für jede Menge Lieblingsmomente.',
|
||
'en' => 'Ideal for birthdays, garden parties or rehearsal dinners! {{max_guests}} guests share their favourite snapshots, take on {{max_tasks}} photo challenges and enjoy gallery access for {{gallery_duration}}. {{max_photos}} photos included for all those memories.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Fotos', 'value' => '{{max_photos}}'],
|
||
['title' => 'Gäste', 'value' => '{{max_guests}}'],
|
||
['title' => 'Aufgaben', 'value' => '{{max_tasks}} Fotoaufgaben'],
|
||
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
|
||
['title' => 'Branding', 'value' => 'Fotospiel Branding'],
|
||
],
|
||
],
|
||
[
|
||
'slug' => 'standard',
|
||
'name' => 'Standard',
|
||
'name_translations' => [
|
||
'de' => 'Standard',
|
||
'en' => 'Standard',
|
||
],
|
||
'type' => PackageType::ENDCUSTOMER,
|
||
'price' => 59.00,
|
||
'max_photos' => 1000,
|
||
'max_guests' => 150,
|
||
'gallery_days' => 30,
|
||
'max_tasks' => 100,
|
||
'watermark_allowed' => false,
|
||
'branding_allowed' => true,
|
||
'features' => ['basic_uploads', 'unlimited_sharing', 'no_watermark', 'custom_branding', 'custom_tasks'],
|
||
'description' => <<<TEXT
|
||
Das Rundum-Sorglos-Paket für Hochzeiten, Firmenfeiern oder Jubiläen. {{max_photos}} Bilder, {{max_guests}} Gäste und {{max_tasks}} Fotoaufgaben – dazu eine Galerie, die {{gallery_duration}} online bleibt. Eigenes Logo oder Wasserzeichen inklusive.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Das Rundum-Sorglos-Paket für Hochzeiten, Firmenfeiern oder Jubiläen. {{max_photos}} Bilder, {{max_guests}} Gäste und {{max_tasks}} Fotoaufgaben – dazu eine Galerie, die {{gallery_duration}} online bleibt. Eigenes Logo oder Wasserzeichen inklusive.',
|
||
'en' => 'The all-in-one package for weddings, corporate events or anniversaries. {{max_photos}} photos, {{max_guests}} guests and {{max_tasks}} photo challenges—plus a gallery that stays online for {{gallery_duration}}. Includes your own logo or watermark.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Fotos', 'value' => '{{max_photos}}'],
|
||
['title' => 'Gäste', 'value' => '{{max_guests}}'],
|
||
['title' => 'Aufgaben', 'value' => '{{max_tasks}} Fotoaufgaben'],
|
||
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
|
||
['title' => 'Branding', 'value' => 'Eigenes Logo & Wasserzeichen'],
|
||
],
|
||
],
|
||
[
|
||
'slug' => 'pro',
|
||
'name' => 'Premium',
|
||
'name_translations' => [
|
||
'de' => 'Premium',
|
||
'en' => 'Premium',
|
||
],
|
||
'type' => PackageType::ENDCUSTOMER,
|
||
'price' => 129.00,
|
||
'max_photos' => 3000,
|
||
'max_guests' => 500,
|
||
'gallery_days' => 180,
|
||
'max_tasks' => 200,
|
||
'watermark_allowed' => false,
|
||
'branding_allowed' => true,
|
||
'features' => ['basic_uploads', 'unlimited_sharing', 'no_watermark', 'custom_branding', 'advanced_analytics', 'live_slideshow', 'priority_support'],
|
||
'description' => <<<TEXT
|
||
Das volle Erlebnis für alle, die keine Kompromisse machen wollen. {{max_photos}} Bilder, {{max_guests}} Gäste, {{gallery_duration}} Galerie-Zugang und {{max_tasks}} Aufgaben – dazu kein Wasserzeichen, Live-Slideshow und Premium-Support.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Das volle Erlebnis für alle, die keine Kompromisse machen wollen. {{max_photos}} Bilder, {{max_guests}} Gäste, {{gallery_duration}} Galerie-Zugang und {{max_tasks}} Aufgaben – dazu kein Wasserzeichen, Live-Slideshow und Premium-Support.',
|
||
'en' => 'The full experience for anyone who refuses to compromise. {{max_photos}} photos, {{max_guests}} guests, {{gallery_duration}} of gallery access and {{max_tasks}} challenges—no watermark, live slideshow and premium support included.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Fotos', 'value' => '{{max_photos}}'],
|
||
['title' => 'Gäste', 'value' => '{{max_guests}}'],
|
||
['title' => 'Aufgaben', 'value' => '{{max_tasks}} Fotoaufgaben'],
|
||
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
|
||
['title' => 'Extras', 'value' => 'Live-Slideshow & Premium-Support'],
|
||
],
|
||
],
|
||
[
|
||
'slug' => 's-small-reseller',
|
||
'name' => 'Reseller S',
|
||
'name_translations' => [
|
||
'de' => 'Reseller S',
|
||
'en' => 'Reseller S',
|
||
],
|
||
'type' => PackageType::RESELLER,
|
||
'price' => 149.00,
|
||
'max_photos' => 1000,
|
||
'max_guests' => null,
|
||
'gallery_days' => 30,
|
||
'max_tasks' => null,
|
||
'watermark_allowed' => true,
|
||
'branding_allowed' => true,
|
||
'max_events_per_year' => 5,
|
||
'expires_after' => now()->copy()->addYear(),
|
||
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support'],
|
||
'description' => <<<TEXT
|
||
Das perfekte Paket für Fotografen oder Planer, die erste Erfahrungen mit Fotospiel sammeln wollen. Enthalten sind {{max_events_per_year}} Events pro Jahr mit Standard-Leistung – Branding-Optionen inklusive.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Das perfekte Paket für Fotografen oder Planer, die erste Erfahrungen mit Fotospiel sammeln wollen. Enthalten sind {{max_events_per_year}} Events pro Jahr mit Standard-Leistung – Branding-Optionen inklusive.',
|
||
'en' => 'Perfect for photographers or planners getting started with Fotospiel. Includes {{max_events_per_year}} events per year with the standard feature set—branding options included.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
|
||
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
|
||
['title' => 'Branding', 'value' => 'Logo & Farben pro Event'],
|
||
],
|
||
],
|
||
[
|
||
'slug' => 'm-medium-reseller',
|
||
'name' => 'Reseller M',
|
||
'name_translations' => [
|
||
'de' => 'Reseller M',
|
||
'en' => 'Reseller M',
|
||
],
|
||
'type' => PackageType::RESELLER,
|
||
'price' => 349.00,
|
||
'max_photos' => 1500,
|
||
'max_guests' => null,
|
||
'gallery_days' => 60,
|
||
'max_tasks' => null,
|
||
'watermark_allowed' => true,
|
||
'branding_allowed' => true,
|
||
'max_events_per_year' => 15,
|
||
'expires_after' => now()->copy()->addYear(),
|
||
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting'],
|
||
'description' => <<<TEXT
|
||
Wenn du regelmäßig Hochzeiten, Firmenfeste oder private Events betreust, ist dieses Paket ideal. {{max_events_per_year}} Events pro Jahr mit Branding-Optionen, verlängerter Galerie-Laufzeit und Reporting inklusive.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Wenn du regelmäßig Hochzeiten, Firmenfeste oder private Events betreust, ist dieses Paket ideal. {{max_events_per_year}} Events pro Jahr mit Branding-Optionen, verlängerter Galerie-Laufzeit und Reporting inklusive.',
|
||
'en' => 'Designed for professionals who regularly support weddings, corporate events or private parties. {{max_events_per_year}} events per year with branding options, extended gallery runtime and reporting included.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
|
||
['title' => 'Galerie', 'value' => '{{gallery_duration}}'],
|
||
['title' => 'Reporting', 'value' => 'Erweiterte Auswertungen'],
|
||
],
|
||
],
|
||
[
|
||
'slug' => 'l-large-reseller',
|
||
'name' => 'Reseller L',
|
||
'name_translations' => [
|
||
'de' => 'Reseller L',
|
||
'en' => 'Reseller L',
|
||
],
|
||
'type' => PackageType::RESELLER,
|
||
'price' => 699.00,
|
||
'max_photos' => 3000,
|
||
'max_guests' => null,
|
||
'gallery_days' => 90,
|
||
'max_tasks' => null,
|
||
'watermark_allowed' => false,
|
||
'branding_allowed' => true,
|
||
'max_events_per_year' => 40,
|
||
'expires_after' => now()->copy()->addYear(),
|
||
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting', 'live_slideshow'],
|
||
'description' => <<<TEXT
|
||
Ideal für Agenturen, Fotografen oder Eventdienstleister mit vielen Veranstaltungen im Jahr. {{max_events_per_year}} Events inklusive, White-Label-Branding und alle Premium-Funktionen sorgen für maximale Flexibilität.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Ideal für Agenturen, Fotografen oder Eventdienstleister mit vielen Veranstaltungen im Jahr. {{max_events_per_year}} Events inklusive, White-Label-Branding und alle Premium-Funktionen sorgen für maximale Flexibilität.',
|
||
'en' => 'Ideal for agencies, photographers or event providers with a packed calendar. {{max_events_per_year}} events included, white-label branding and all premium features for maximum flexibility.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
|
||
['title' => 'Branding', 'value' => 'White-Label & eigene Domains'],
|
||
['title' => 'Extras', 'value' => 'Live-Slideshow & Premium-Features'],
|
||
],
|
||
],
|
||
[
|
||
'slug' => 'enterprise-unlimited',
|
||
'name' => 'Enterprise / Unlimited',
|
||
'name_translations' => [
|
||
'de' => 'Enterprise / Unlimited',
|
||
'en' => 'Enterprise / Unlimited',
|
||
],
|
||
'type' => PackageType::RESELLER,
|
||
'price' => 1999.00,
|
||
'max_photos' => null,
|
||
'max_guests' => null,
|
||
'gallery_days' => null,
|
||
'max_tasks' => null,
|
||
'watermark_allowed' => false,
|
||
'branding_allowed' => true,
|
||
'max_events_per_year' => null,
|
||
'expires_after' => now()->copy()->addYear(),
|
||
'features' => ['reseller_dashboard', 'custom_branding', 'priority_support', 'advanced_reporting', 'live_slideshow', 'unlimited_sharing'],
|
||
'description' => <<<TEXT
|
||
Das Rundum-Paket für Unternehmen und Agenturen, die maximale Flexibilität brauchen. {{max_events_per_year}} Events, volles White-Label-Branding, eigene Subdomain oder App-Branding – alles individuell anpassbar, inklusive persönlicher Betreuung.
|
||
TEXT,
|
||
'description_translations' => [
|
||
'de' => 'Das Rundum-Paket für Unternehmen und Agenturen, die maximale Flexibilität brauchen. {{max_events_per_year}} Events, volles White-Label-Branding, eigene Subdomain oder App-Branding – alles individuell anpassbar, inklusive persönlicher Betreuung.',
|
||
'en' => 'The all-round package for enterprises and agencies needing maximum flexibility. {{max_events_per_year}} events, full white-label branding, your own subdomain or app branding—fully customisable with dedicated support.',
|
||
],
|
||
'description_table' => [
|
||
['title' => 'Events/Jahr', 'value' => '{{max_events_per_year}} Events'],
|
||
['title' => 'Branding', 'value' => 'Eigene Subdomain oder App'],
|
||
['title' => 'Support', 'value' => 'Persönliche Betreuung'],
|
||
],
|
||
],
|
||
];
|
||
|
||
foreach ($packages as $data) {
|
||
$descriptionTable = $data['description_table'] ?? [];
|
||
Package::updateOrCreate(
|
||
['slug' => $data['slug']],
|
||
array_merge($data, [
|
||
'description_table' => $descriptionTable,
|
||
])
|
||
);
|
||
}
|
||
}
|
||
}
|