20-02-2026

This commit is contained in:
Kevin Adametz 2026-02-20 17:57:50 +01:00
parent 854ce02bf6
commit 4d6b4930b2
128 changed files with 18247 additions and 2093 deletions

View file

@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use App\Models\Brand;
use App\Models\Partner;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<Brand>
*/
class BrandFactory extends Factory
{
protected $model = Brand::class;
public function definition(): array
{
$name = fake()->company().' '.fake()->randomElement(['Design', 'Living', 'Home']);
return [
'partner_id' => Partner::factory()->manufacturer(),
'name' => $name,
'slug' => Str::slug($name).'-'.fake()->unique()->numberBetween(100, 999),
'is_active' => true,
];
}
}

View file

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

View file

@ -0,0 +1,36 @@
<?php
namespace Database\Factories;
use App\Models\Hub;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<Hub>
*/
class HubFactory extends Factory
{
protected $model = Hub::class;
public function definition(): array
{
$name = fake()->city().' '.fake()->randomElement(['Region', 'Hub', 'Gebiet']);
return [
'name' => $name,
'slug' => Str::slug($name).'-'.fake()->unique()->numberBetween(100, 999),
'is_active' => true,
];
}
/**
* Inaktiver Hub.
*/
public function inactive(): static
{
return $this->state(fn (array $attributes) => [
'is_active' => false,
]);
}
}

View file

@ -0,0 +1,49 @@
<?php
namespace Database\Factories;
use App\Models\Media;
use App\Models\Product;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Media>
*/
class MediaFactory extends Factory
{
protected $model = Media::class;
public function definition(): array
{
return [
'model_type' => Product::class,
'model_id' => Product::factory(),
'file_path' => 'media/'.fake()->uuid().'.jpg',
'type' => 'image',
'alt_text' => fake()->sentence(3),
'order_column' => 0,
];
}
/**
* Video-Media.
*/
public function video(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'video',
'file_path' => 'media/'.fake()->uuid().'.mp4',
]);
}
/**
* PDF-Dokument.
*/
public function pdf(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'pdf',
'file_path' => 'media/'.fake()->uuid().'.pdf',
]);
}
}

View file

@ -0,0 +1,79 @@
<?php
namespace Database\Factories;
use App\Models\Partner;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<Partner>
*/
class PartnerFactory extends Factory
{
protected $model = Partner::class;
public function definition(): array
{
$company = fake()->company();
return [
'company_name' => $company,
'slug' => Str::slug($company).'-'.fake()->unique()->numberBetween(100, 999),
'type' => 'Retailer',
'is_active' => true,
];
}
/**
* Händler (Retailer).
*/
public function retailer(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'Retailer',
'delivery_radius_km' => fake()->numberBetween(10, 100),
]);
}
/**
* Hersteller (Manufacturer).
*/
public function manufacturer(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'Manufacturer',
]);
}
/**
* Makler (Estate-Agent).
*/
public function estateAgent(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'Estate-Agent',
]);
}
/**
* Partner mit Setup abgeschlossen.
*/
public function setupCompleted(): static
{
return $this->state(fn (array $attributes) => [
'setup_completed' => true,
'setup_completed_at' => now(),
]);
}
/**
* Inaktiver Partner.
*/
public function inactive(): static
{
return $this->state(fn (array $attributes) => [
'is_active' => false,
]);
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace Database\Factories;
use App\Models\Product;
use App\Models\ProductActivity;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProductActivity>
*/
class ProductActivityFactory extends Factory
{
protected $model = ProductActivity::class;
public function definition(): array
{
return [
'product_id' => Product::factory(),
'user_id' => User::factory(),
'action' => fake()->randomElement(['created', 'updated', 'submitted', 'approved', 'correction', 'rejected']),
'note' => null,
];
}
}

View file

@ -0,0 +1,93 @@
<?php
namespace Database\Factories;
use App\Enums\PriceType;
use App\Enums\ProductStatus;
use App\Enums\ProductType;
use App\Models\Hub;
use App\Models\Partner;
use App\Models\Product;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<Product>
*/
class ProductFactory extends Factory
{
protected $model = Product::class;
public function definition(): array
{
$name = fake()->words(3, true);
return [
'partner_id' => Partner::factory(),
'name' => ucfirst($name),
'slug' => Str::slug($name).'-'.fake()->unique()->numberBetween(1000, 9999),
'product_type' => ProductType::LocalStock,
'status' => ProductStatus::Draft,
'price_type' => PriceType::Fixed,
'description_short' => fake()->sentence(),
'description_long' => fake()->paragraphs(2, true),
'is_curated' => false,
'is_available' => true,
];
}
/**
* Teaser-Produkt (Säule A: Local Express).
*/
public function localStock(): static
{
return $this->state(fn (array $attributes) => [
'product_type' => ProductType::LocalStock,
'price_type' => PriceType::Fixed,
]);
}
/**
* Konfigurations-Produkt (Säule B: Smart Club).
*/
public function smartOrder(): static
{
return $this->state(fn (array $attributes) => [
'product_type' => ProductType::SmartOrder,
'price_type' => PriceType::FromPrice,
]);
}
/**
* Aktives und kuratiertes Produkt.
*/
public function active(): static
{
return $this->state(fn (array $attributes) => [
'status' => ProductStatus::Active,
'is_curated' => true,
'curated_at' => now(),
]);
}
/**
* Produkt in einem bestimmten Hub.
*/
public function inHub(Hub $hub): static
{
return $this->state(fn (array $attributes) => [
'hub_id' => $hub->id,
]);
}
/**
* Verkauftes Produkt.
*/
public function sold(): static
{
return $this->state(fn (array $attributes) => [
'status' => ProductStatus::Sold,
'is_available' => false,
]);
}
}

View file

@ -0,0 +1,29 @@
<?php
namespace Database\Factories;
use App\Models\Product;
use App\Models\ProductWoodOrigin;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<ProductWoodOrigin>
*/
class ProductWoodOriginFactory extends Factory
{
protected $model = ProductWoodOrigin::class;
public function definition(): array
{
return [
'product_id' => Product::factory(),
'wood_species' => fake()->randomElement(['Quercus robur', 'Fagus sylvatica', 'Pinus sylvestris', 'Picea abies']),
'origin_country' => fake()->randomElement(['DE', 'AT', 'PL', 'CZ', 'FR']),
'origin_region' => fake()->optional()->city(),
'harvest_year' => fake()->optional()->numberBetween(2020, 2026),
'forest_operator' => fake()->optional()->company(),
'sustainability_certificate' => fake()->optional()->randomElement(['FSC', 'PEFC', 'FSC/PEFC']),
'eudr_reference_id' => fake()->optional()->uuid(),
];
}
}

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->foreignId('hub_id')
->nullable()
->after('partner_id')
->constrained('hubs')
->nullOnDelete();
$table->string('origin')
->nullable()
->after('hub_id')
->comment('style2own or stileigentum');
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropForeign(['hub_id']);
$table->dropColumn(['hub_id', 'origin']);
});
}
};

View file

@ -0,0 +1,70 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
$table->foreignId('hub_id')
->nullable()
->after('collection_id')
->constrained('hubs')
->nullOnDelete();
$table->string('product_type')
->default('local_stock')
->after('slug')
->comment('local_stock or smart_order');
$table->string('price_type')
->default('fixed')
->after('status')
->comment('fixed, from_price, or on_request');
$table->string('price_display_text')
->nullable()
->after('price_type')
->comment('Custom display text like Ab 2.500 EUR');
$table->boolean('is_curated')
->default(false)
->after('meta_description');
$table->timestamp('curated_at')
->nullable()
->after('is_curated');
$table->foreignId('curated_by')
->nullable()
->after('curated_at')
->constrained('users')
->nullOnDelete();
$table->boolean('is_available')
->default(true)
->after('curated_by');
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropForeign(['hub_id']);
$table->dropForeign(['curated_by']);
$table->dropColumn([
'hub_id',
'product_type',
'price_type',
'price_display_text',
'is_curated',
'curated_at',
'curated_by',
'is_available',
]);
});
}
};

View file

@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('partners', function (Blueprint $table) {
$table->text('story_text')
->nullable()
->after('description')
->comment('Partner story/about us text');
$table->json('opening_hours')
->nullable()
->after('story_text')
->comment('Structured opening hours');
$table->json('specialties')
->nullable()
->after('opening_hours')
->comment('Areas of expertise');
$table->integer('founded_year')
->nullable()
->after('specialties');
});
}
public function down(): void
{
Schema::table('partners', function (Blueprint $table) {
$table->dropColumn([
'story_text',
'opening_hours',
'specialties',
'founded_year',
]);
});
}
};

View file

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('group')->index();
$table->string('key');
$table->text('value')->nullable();
$table->string('type')->default('string')->comment('string, integer, boolean, json');
$table->text('description')->nullable();
$table->timestamps();
$table->unique(['group', 'key']);
});
}
public function down(): void
{
Schema::dropIfExists('settings');
}
};

View file

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('product_variants', function (Blueprint $table) {
$table->unsignedBigInteger('tax_rate_id')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('product_variants', function (Blueprint $table) {
$table->unsignedBigInteger('tax_rate_id')->nullable(false)->change();
});
}
};

View file

@ -0,0 +1,66 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
// Materialien & Beschaffenheit
$table->string('country_of_origin', 2)->nullable()->after('care_instructions');
$table->string('main_material')->nullable()->after('country_of_origin');
$table->string('surface_material')->nullable()->after('main_material');
$table->string('cover_material')->nullable()->after('surface_material');
$table->string('color_finish')->nullable()->after('cover_material');
$table->json('certificates')->nullable()->after('color_finish');
// Montage & Physisch
$table->integer('assembly_time_min')->nullable()->after('assembly_status');
$table->integer('load_capacity_kg')->nullable()->after('assembly_time_min');
// Lieferung & Services
$table->string('delivery_type')->nullable()->after('load_capacity_kg');
$table->boolean('assembly_service')->default(false)->after('delivery_type');
$table->integer('service_radius_km')->nullable()->after('assembly_service');
$table->integer('warranty_months')->nullable()->after('service_radius_km');
$table->integer('production_time_days')->nullable()->after('warranty_months');
// Sichtbarkeit
$table->date('visible_from')->nullable()->after('is_available');
$table->date('visible_until')->nullable()->after('visible_from');
// Nachhaltigkeit
$table->decimal('co2_footprint_kg', 8, 2)->nullable()->after('visible_until');
$table->integer('recycling_percentage')->nullable()->after('co2_footprint_kg');
$table->boolean('is_regional_production')->default(false)->after('recycling_percentage');
// Scoring (B2in intern)
$table->integer('storage_volume_liters')->nullable()->after('is_regional_production');
$table->tinyInteger('assembly_effort_score')->nullable()->after('storage_volume_liters');
$table->tinyInteger('design_score')->nullable()->after('assembly_effort_score');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn([
'country_of_origin', 'main_material', 'surface_material', 'cover_material',
'color_finish', 'certificates', 'assembly_time_min', 'load_capacity_kg',
'delivery_type', 'assembly_service', 'service_radius_km', 'warranty_months',
'production_time_days', 'visible_from', 'visible_until', 'co2_footprint_kg',
'recycling_percentage', 'is_regional_production', 'storage_volume_liters',
'assembly_effort_score', 'design_score',
]);
});
}
};

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('product_logistics', function (Blueprint $table) {
$table->string('packaging_type')->nullable()->after('location_bin');
$table->integer('packaging_recyclable_percent')->nullable()->after('packaging_type');
$table->boolean('is_palletizable')->default(false)->after('packaging_recyclable_percent');
$table->string('hs_code')->nullable()->after('is_palletizable');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('product_logistics', function (Blueprint $table) {
$table->dropColumn(['packaging_type', 'packaging_recyclable_percent', 'is_palletizable', 'hs_code']);
});
}
};

View file

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('product_variants', function (Blueprint $table) {
$table->string('currency', 3)->default('EUR')->after('delivery_time_text');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('product_variants', function (Blueprint $table) {
$table->dropColumn('currency');
});
}
};

View file

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('product_wood_origins', function (Blueprint $table) {
$table->id();
$table->foreignId('product_id')->constrained('products')->onDelete('cascade');
$table->string('wood_species');
$table->string('origin_country', 2);
$table->string('origin_region')->nullable();
$table->integer('harvest_year')->nullable();
$table->string('forest_operator')->nullable();
$table->string('sustainability_certificate')->nullable();
$table->string('eudr_reference_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('product_wood_origins');
}
};

View file

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
// Product numbers on products table
Schema::table('products', function (Blueprint $table) {
$table->string('partner_product_number')->nullable()->after('partner_id');
$table->string('b2in_article_number')->nullable()->unique()->after('partner_product_number');
$table->boolean('visibleIsAvailable')->default(false)->after('is_available');
});
// Make SKU and selling_price nullable on product_variants
Schema::table('product_variants', function (Blueprint $table) {
$table->string('sku')->nullable()->change();
$table->integer('selling_price')->nullable()->change();
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn(['partner_product_number', 'b2in_article_number']);
});
Schema::table('product_variants', function (Blueprint $table) {
$table->string('sku')->nullable(false)->change();
$table->integer('selling_price')->nullable(false)->change();
});
}
};

View file

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
$table->text('curation_notes')->nullable()->after('curated_by');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn('curation_notes');
});
}
};

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('product_activities', function (Blueprint $table) {
$table->id();
$table->foreignId('product_id')->constrained()->cascadeOnDelete();
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
$table->string('action');
$table->text('note')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('product_activities');
}
};

View file

@ -0,0 +1,41 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class CategorySeeder extends Seeder
{
public function run(): void
{
$categories = [
'Wohnzimmer',
'Schlafzimmer',
'Esszimmer',
'Küche',
'Bad & Wellness',
'Arbeitszimmer',
'Kinderzimmer',
'Outdoor & Garten',
'Beleuchtung',
'Textilien & Dekoration',
'Teppiche',
'Maßmöbel',
'Dienstleistungen',
];
foreach ($categories as $name) {
DB::table('categories')->updateOrInsert(
['slug' => Str::slug($name)],
[
'name' => $name,
'slug' => Str::slug($name),
'created_at' => now(),
'updated_at' => now(),
]
);
}
}
}

View file

@ -0,0 +1,292 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
/**
* Stellt den Testdaten-Stand vom 12.02.2026 wieder her.
* Basierend auf: dev/12-01-2026/db-backup.sql
*
* Nutzung: php artisan db:seed --class=RestoreBackupSeeder
* Voraussetzung: Migrationen müssen gelaufen sein (php artisan migrate)
*/
class RestoreBackupSeeder extends Seeder
{
public function run(): void
{
$isMysql = DB::connection()->getDriverName() === 'mysql';
if ($isMysql) {
DB::statement('SET FOREIGN_KEY_CHECKS=0');
}
$this->seedCategories();
$this->seedRoles();
$this->seedPermissions();
$this->seedRoleHasPermissions();
$this->seedPartners();
$this->seedUsers();
$this->seedModelHasRoles();
$this->seedBrands();
$this->seedPartnerInvitations();
$this->seedRegistrationCodes();
$this->seedDisplayVideos();
$this->seedDisplayFooterContents();
if ($isMysql) {
DB::statement('SET FOREIGN_KEY_CHECKS=1');
}
$this->command->info('Backup-Daten erfolgreich wiederhergestellt.');
}
public function seedCategories(): void
{
$categories = [
'Wohnzimmer',
'Schlafzimmer',
'Esszimmer',
'Küche',
'Bad & Wellness',
'Arbeitszimmer',
'Kinderzimmer',
'Outdoor & Garten',
'Beleuchtung',
'Textilien & Dekoration',
'Teppiche',
'Maßmöbel',
'Dienstleistungen',
];
foreach ($categories as $name) {
DB::table('categories')->updateOrInsert(
['slug' => Str::slug($name)],
[
'name' => $name,
'slug' => Str::slug($name),
'created_at' => now(),
'updated_at' => now(),
]
);
}
}
private function seedRoles(): void
{
DB::table('roles')->truncate();
DB::table('roles')->insert([
['id' => 1, 'name' => 'Customer', 'display_name' => 'Kunde (Customer)', 'icon' => 'user', 'can_be_invited' => 1, 'reg_prefix' => 'K', 'reg_description' => 'Kundencodes werden Maklern oder Händlern zugeordnet', 'reg_start_number' => 40000001, 'guard_name' => 'web', 'color' => 'indigo', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-12-16 14:56:59'],
['id' => 2, 'name' => 'Broker', 'display_name' => 'Makler (Broker)', 'icon' => 'home', 'can_be_invited' => 1, 'reg_prefix' => 'M', 'reg_description' => 'Maklercodes für die Registrierung von Maklern', 'reg_start_number' => 10000001, 'guard_name' => 'web', 'color' => 'lime', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-12-17 12:00:39'],
['id' => 3, 'name' => 'Retailer', 'display_name' => 'Händler (Retailer)', 'icon' => 'building-storefront', 'can_be_invited' => 1, 'reg_prefix' => 'H', 'reg_description' => 'Händlercodes für die Registrierung von Händlern', 'reg_start_number' => 20000001, 'guard_name' => 'web', 'color' => 'teal', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-12-16 14:57:09'],
['id' => 4, 'name' => 'Manufacturer', 'display_name' => 'Hersteller (Manufacturer)', 'icon' => 'wrench-screwdriver', 'can_be_invited' => 1, 'reg_prefix' => 'P', 'reg_description' => 'Herstellercodes für die Registrierung von Herstellern', 'reg_start_number' => 30000001, 'guard_name' => 'web', 'color' => 'orange', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-12-16 14:57:15'],
['id' => 5, 'name' => 'Admin', 'display_name' => 'Admin (Administrator)', 'icon' => 'user-circle', 'can_be_invited' => 0, 'reg_prefix' => null, 'reg_description' => null, 'reg_start_number' => null, 'guard_name' => 'web', 'color' => 'purple', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 6, 'name' => 'Super-Admin', 'display_name' => 'Super-Admin (Entwickler)', 'icon' => 'shield-check', 'can_be_invited' => 0, 'reg_prefix' => null, 'reg_description' => null, 'reg_start_number' => null, 'guard_name' => 'web', 'color' => 'red', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
]);
}
private function seedPermissions(): void
{
DB::table('permissions')->truncate();
DB::table('permissions')->insert([
['id' => 1, 'name' => 'view hubs', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 2, 'name' => 'create hubs', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 3, 'name' => 'edit hubs', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 4, 'name' => 'delete hubs', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 5, 'name' => 'view partners', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 6, 'name' => 'create partners', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 7, 'name' => 'edit partners', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 8, 'name' => 'delete partners', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 9, 'name' => 'manage provisions', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 10, 'name' => 'view products', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 11, 'name' => 'create products', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 12, 'name' => 'edit products', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 13, 'name' => 'delete products', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 14, 'name' => 'manage rental options', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 15, 'name' => 'view orders', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 16, 'name' => 'manage orders', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 17, 'name' => 'view users', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 18, 'name' => 'manage users', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 19, 'name' => 'manage roles', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 20, 'name' => 'access dashboard', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
['id' => 21, 'name' => 'place orders', 'guard_name' => 'web', 'created_at' => '2025-11-21 14:29:15', 'updated_at' => '2025-11-21 14:29:15'],
]);
}
private function seedRoleHasPermissions(): void
{
DB::table('role_has_permissions')->truncate();
DB::table('role_has_permissions')->insert([
['permission_id' => 1, 'role_id' => 2],
['permission_id' => 1, 'role_id' => 5],
['permission_id' => 2, 'role_id' => 5],
['permission_id' => 3, 'role_id' => 5],
['permission_id' => 4, 'role_id' => 5],
['permission_id' => 5, 'role_id' => 2],
['permission_id' => 5, 'role_id' => 5],
['permission_id' => 6, 'role_id' => 5],
['permission_id' => 7, 'role_id' => 5],
['permission_id' => 8, 'role_id' => 5],
['permission_id' => 9, 'role_id' => 5],
['permission_id' => 10, 'role_id' => 1],
['permission_id' => 10, 'role_id' => 3],
['permission_id' => 10, 'role_id' => 4],
['permission_id' => 10, 'role_id' => 5],
['permission_id' => 11, 'role_id' => 3],
['permission_id' => 11, 'role_id' => 4],
['permission_id' => 11, 'role_id' => 5],
['permission_id' => 12, 'role_id' => 3],
['permission_id' => 12, 'role_id' => 4],
['permission_id' => 12, 'role_id' => 5],
['permission_id' => 13, 'role_id' => 3],
['permission_id' => 13, 'role_id' => 4],
['permission_id' => 13, 'role_id' => 5],
['permission_id' => 14, 'role_id' => 3],
['permission_id' => 14, 'role_id' => 4],
['permission_id' => 14, 'role_id' => 5],
['permission_id' => 15, 'role_id' => 1],
['permission_id' => 15, 'role_id' => 3],
['permission_id' => 15, 'role_id' => 4],
['permission_id' => 15, 'role_id' => 5],
['permission_id' => 16, 'role_id' => 3],
['permission_id' => 16, 'role_id' => 4],
['permission_id' => 16, 'role_id' => 5],
['permission_id' => 17, 'role_id' => 5],
['permission_id' => 18, 'role_id' => 5],
['permission_id' => 19, 'role_id' => 5],
['permission_id' => 20, 'role_id' => 2],
['permission_id' => 20, 'role_id' => 3],
['permission_id' => 20, 'role_id' => 4],
['permission_id' => 20, 'role_id' => 5],
['permission_id' => 21, 'role_id' => 1],
]);
}
private function seedPartners(): void
{
DB::table('partners')->truncate();
DB::table('partners')->insert([
['id' => 4, 'company_name' => 'Media Matters ', 'display_name' => null, 'slug' => 'media-matters', 'type' => 'Retailer', 'brand' => null, 'salutation' => null, 'first_name' => null, 'last_name' => null, 'hub_id' => null, 'parent_partner_id' => null, 'description' => null, 'street' => null, 'house_number' => null, 'zip' => null, 'city' => null, 'country' => 'Deutschland', 'phone' => null, 'website' => null, 'logo_url' => null, 'is_active' => 0, 'setup_completed' => 0, 'setup_completed_at' => null, 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-11-21 15:01:15', 'updated_at' => '2025-11-21 15:01:15'],
['id' => 5, 'company_name' => 'Partner M10000001', 'display_name' => null, 'slug' => 'partner-m10000001-91', 'type' => 'Estate-Agent', 'brand' => null, 'salutation' => null, 'first_name' => null, 'last_name' => null, 'hub_id' => null, 'parent_partner_id' => null, 'description' => '', 'street' => null, 'house_number' => null, 'zip' => null, 'city' => null, 'country' => 'Deutschland', 'phone' => null, 'website' => null, 'logo_url' => null, 'is_active' => 0, 'setup_completed' => 0, 'setup_completed_at' => null, 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-16 15:05:26', 'updated_at' => '2025-12-16 16:47:39'],
['id' => 6, 'company_name' => 'Markler Klaus M10000002', 'display_name' => 'Max Schmidt', 'slug' => 'partner-m10000002-104', 'type' => 'Estate-Agent', 'brand' => null, 'salutation' => 'Herr', 'first_name' => 'test', 'last_name' => 'test123', 'hub_id' => null, 'parent_partner_id' => null, 'description' => '', 'street' => 'Teststraße', 'house_number' => '123', 'zip' => '12344', 'city' => 'Musterstadt', 'country' => 'Deutschland', 'phone' => '', 'website' => '', 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-17 16:41:19', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-16 16:29:03', 'updated_at' => '2025-12-17 16:41:19'],
['id' => 9, 'company_name' => 'roles.customer K40000001', 'display_name' => null, 'slug' => 'rolescustomer-k40000001-93', 'type' => 'customer', 'brand' => null, 'salutation' => 'Herr', 'first_name' => 'asd', 'last_name' => 'asd', 'hub_id' => null, 'parent_partner_id' => 5, 'description' => null, 'street' => 'Musterstraße', 'house_number' => '1235', 'zip' => '12343', 'city' => '2134', 'country' => 'Deutschland', 'phone' => '', 'website' => null, 'logo_url' => null, 'is_active' => 0, 'setup_completed' => 0, 'setup_completed_at' => null, 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-17 12:38:20', 'updated_at' => '2025-12-17 16:43:08'],
['id' => 10, 'company_name' => 'Hersteller P30000001', 'display_name' => null, 'slug' => 'rolesmanufacturer-p30000001-105', 'type' => 'manufacturer', 'brand' => 'b2in', 'salutation' => 'Herr', 'first_name' => 'Herr', 'last_name' => 'Steller', 'hub_id' => null, 'parent_partner_id' => null, 'description' => '', 'street' => 'Musterstraße', 'house_number' => '123', 'zip' => '12345', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '', 'website' => '', 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-18 13:10:19', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-18 08:11:34', 'updated_at' => '2025-12-18 17:56:39'],
['id' => 11, 'company_name' => 'Max Möbelmann', 'display_name' => null, 'slug' => 'max-mobelmann', 'type' => 'customer', 'brand' => 'stileigentum', 'salutation' => 'Frau', 'first_name' => 'Franz', 'last_name' => 'Hatstil', 'hub_id' => null, 'parent_partner_id' => null, 'description' => null, 'street' => 'In der Lake', 'house_number' => '4', 'zip' => '33739', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '170206113', 'website' => null, 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-18 10:14:50', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-18 09:46:11', 'updated_at' => '2025-12-18 17:55:59'],
['id' => 12, 'company_name' => 'roles.customer K40000003', 'display_name' => null, 'slug' => 'rolescustomer-k40000003-95', 'type' => 'customer', 'brand' => 'style2own', 'salutation' => 'Frau', 'first_name' => 'Steffi', 'last_name' => 'Willmöbel', 'hub_id' => null, 'parent_partner_id' => 5, 'description' => null, 'street' => 'In der Lake', 'house_number' => '4', 'zip' => '33739', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '170206113', 'website' => null, 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-18 10:26:45', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-18 10:23:23', 'updated_at' => '2025-12-18 17:54:55'],
['id' => 13, 'company_name' => 'Immobilien M10000004', 'display_name' => 'Markler Max ', 'slug' => 'rolesbroker-m10000004-108', 'type' => 'broker', 'brand' => 'b2in', 'salutation' => 'Herr', 'first_name' => 'Immobilien', 'last_name' => 'Schulz', 'hub_id' => null, 'parent_partner_id' => null, 'description' => '', 'street' => 'In der Lake', 'house_number' => '4', 'zip' => '33739', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '170206113', 'website' => '', 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-18 10:36:31', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-18 10:30:41', 'updated_at' => '2025-12-18 17:54:21'],
['id' => 14, 'company_name' => 'Händler H20000001', 'display_name' => null, 'slug' => 'rolesretailer-h20000001-109', 'type' => 'retailer', 'brand' => 'b2in', 'salutation' => 'Herr', 'first_name' => 'Händler', 'last_name' => 'Max', 'hub_id' => null, 'parent_partner_id' => null, 'description' => '', 'street' => 'In der Lake', 'house_number' => '12', 'zip' => '33739', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '170206113', 'website' => '', 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-18 10:40:48', 'delivery_radius_km' => 20, 'assembly_radius_km' => 30, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-18 10:37:29', 'updated_at' => '2025-12-18 17:53:56'],
['id' => 15, 'company_name' => 'Hersteller P30000002', 'display_name' => null, 'slug' => 'rolesmanufacturer-p30000002-107', 'type' => 'manufacturer', 'brand' => 'b2in', 'salutation' => 'Herr', 'first_name' => 'Hersteller', 'last_name' => 'Moritz', 'hub_id' => null, 'parent_partner_id' => null, 'description' => '', 'street' => 'In der Lake', 'house_number' => '4', 'zip' => '33739', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '170206113', 'website' => '', 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-18 10:55:57', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-18 10:46:07', 'updated_at' => '2025-12-18 17:53:22'],
['id' => 16, 'company_name' => 'Marcel Scheibe', 'display_name' => null, 'slug' => 'marcel-scheibe', 'type' => 'Customer', 'brand' => null, 'salutation' => 'Herr', 'first_name' => 'Marcel', 'last_name' => 'Scheibe', 'hub_id' => null, 'parent_partner_id' => null, 'description' => null, 'street' => 'In der Lake', 'house_number' => '4', 'zip' => '33739', 'city' => 'Bielefeld', 'country' => 'Deutschland', 'phone' => '170206113', 'website' => null, 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2025-12-19 11:21:05', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2025-12-19 11:20:56', 'updated_at' => '2025-12-19 11:21:05'],
['id' => 17, 'company_name' => 'Makler M10000005', 'display_name' => 'B2in TEST', 'slug' => 'rolesbroker-m10000005-110', 'type' => 'broker', 'brand' => 'b2in', 'salutation' => 'Herr', 'first_name' => 'Marcel', 'last_name' => 'Scheibe', 'hub_id' => null, 'parent_partner_id' => null, 'description' => 'Hallo', 'street' => 'Feldstrasse ', 'house_number' => '59', 'zip' => '32120', 'city' => 'Hiddenhausen', 'country' => 'Deutschland', 'phone' => '015151002992', 'website' => '', 'logo_url' => null, 'is_active' => 1, 'setup_completed' => 1, 'setup_completed_at' => '2026-01-14 10:48:58', 'delivery_radius_km' => null, 'assembly_radius_km' => null, 'provision_fixed_amount' => null, 'provision_rate_percentage' => null, 'created_at' => '2026-01-14 10:45:36', 'updated_at' => '2026-01-14 10:48:58'],
]);
}
private function seedUsers(): void
{
DB::table('users')->truncate();
DB::table('users')->insert([
['id' => 1, 'partner_id' => null, 'hub_id' => null, 'origin' => null, 'name' => 'Kevin Adametz', 'display_name' => null, 'email' => 'kevin.adametz@me.com', 'email_verified_at' => '2025-11-21 14:29:10', 'password' => '$2y$12$pw7z0He1cIJ/owZOJWYu8O.d6dh6uIgH1tQeB8EiAS7PE3iwnL7Si', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => 'aznSzEV51VHUf5GBlkykgRKRpGW8zQaMHdS792uoCXg5zySz8NGI3YxdBwwo', 'created_at' => '2025-11-21 14:29:10', 'updated_at' => '2025-12-19 10:58:54', 'deleted_at' => null],
['id' => 5, 'partner_id' => 4, 'hub_id' => null, 'origin' => null, 'name' => 'Gelöschter Benutzer #5', 'display_name' => null, 'email' => 'deleted_5@anonymized.local', 'email_verified_at' => '2025-11-21 15:01:16', 'password' => '$2y$12$UH.TScgahDROtFFDI/vkw.hZvXUrmStdyaDRG85I1kAHBpcQMYZSq', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => 'ZB4rw542j7Uq2rcvoFz0NLa4ldftZvW5yYqUmGtkvGclZsxma0S5kLC9KWQt', 'created_at' => '2025-11-21 15:01:16', 'updated_at' => '2025-12-18 08:07:32', 'deleted_at' => '2025-12-18 08:07:32'],
['id' => 6, 'partner_id' => 5, 'hub_id' => null, 'origin' => null, 'name' => 'Gelöschter Benutzer #6', 'display_name' => null, 'email' => 'deleted_6@anonymized.local', 'email_verified_at' => '2025-12-16 15:05:26', 'password' => '$2y$12$UD3ivNt9uqv.TcooAf.jQOqeCfhX1aXRABGYvCC7XLznhqrbm681.', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => 'Lega5Eb5bhmGYVT5z6Fkzf7wuF9GwQLG1VEoerP7yvhz4YfrLIEcibDZxOOv', 'created_at' => '2025-12-16 15:05:26', 'updated_at' => '2025-12-18 08:07:20', 'deleted_at' => '2025-12-18 08:07:20'],
['id' => 7, 'partner_id' => 6, 'hub_id' => null, 'origin' => null, 'name' => 'Gelöschter Benutzer #7', 'display_name' => null, 'email' => 'deleted_7@anonymized.local', 'email_verified_at' => '2025-12-16 16:29:03', 'password' => '$2y$12$DmnePN980lksdVtWhL6HyeSD6sJ3oGoRKq3pqs4UV0ADpWUYKQq3e', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-16 16:29:03', 'updated_at' => '2025-12-18 08:07:16', 'deleted_at' => '2025-12-18 08:07:16'],
['id' => 10, 'partner_id' => 9, 'hub_id' => null, 'origin' => null, 'name' => 'Gelöschter Benutzer #10', 'display_name' => null, 'email' => 'deleted_10@anonymized.local', 'email_verified_at' => '2025-12-17 12:57:18', 'password' => '$2y$12$q0O2UymzIdLS3zr.rvMib.QBoeo7tPg3K9YM9a5bw5zx0gi9OHbta', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-17 12:38:20', 'updated_at' => '2025-12-18 08:07:01', 'deleted_at' => '2025-12-18 08:07:01'],
['id' => 11, 'partner_id' => 10, 'hub_id' => null, 'origin' => null, 'name' => 'Herr Steller', 'display_name' => 'Herr Steller', 'email' => 'info1@adametz.media', 'email_verified_at' => '2025-12-18 08:11:52', 'password' => '$2y$12$HpQQMRo6dtQHsJC0ZNpBxO6pKRUpAEZnIXBEYdF4i5TC4j0P6alUa', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-18 08:11:34', 'updated_at' => '2025-12-18 17:51:08', 'deleted_at' => null],
['id' => 12, 'partner_id' => 11, 'hub_id' => null, 'origin' => null, 'name' => 'Franz Hatstil', 'display_name' => null, 'email' => 'info3@adametz.media', 'email_verified_at' => '2025-12-18 09:46:11', 'password' => '$2y$12$2EeN31d8rapcACWOsVWON.j6AeTJ1puR3VNWUE3e.wDsklwLT8jom', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-18 09:46:11', 'updated_at' => '2025-12-18 17:55:44', 'deleted_at' => null],
['id' => 13, 'partner_id' => 12, 'hub_id' => null, 'origin' => null, 'name' => 'Steffi Willmöbel', 'display_name' => null, 'email' => 'info4@adametz.media', 'email_verified_at' => '2025-12-18 10:23:38', 'password' => '$2y$12$VCPjieqeb9aTERmnVd6JJ.koqOGGokq0k2143u1e6FjKrHDKrER2y', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-18 10:23:23', 'updated_at' => '2025-12-18 17:55:13', 'deleted_at' => null],
['id' => 14, 'partner_id' => 13, 'hub_id' => null, 'origin' => null, 'name' => 'Immobilien Schulz', 'display_name' => 'Immobilien Schulz', 'email' => 'info5@adametz.media', 'email_verified_at' => '2025-12-18 10:31:14', 'password' => '$2y$12$i4sN9dx9XGMgTyh3dG8ice38bpqqcd4OQ9ziw.uxUI7O1iK4e1c1m', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-18 10:30:41', 'updated_at' => '2025-12-18 17:52:20', 'deleted_at' => null],
['id' => 15, 'partner_id' => 14, 'hub_id' => null, 'origin' => null, 'name' => 'Händler Max', 'display_name' => 'Händler Max', 'email' => 'info6@adametz.media', 'email_verified_at' => '2025-12-18 10:37:36', 'password' => '$2y$12$9FibRJHcYDXZ5Uvp.yL3pe21eEUXIAfsFUjKsNiSb.wYBOJnI1him', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-18 10:37:29', 'updated_at' => '2025-12-18 17:34:16', 'deleted_at' => null],
['id' => 16, 'partner_id' => 15, 'hub_id' => null, 'origin' => null, 'name' => 'Hersteller Moritz', 'display_name' => 'Hersteller Moritz', 'email' => 'kevin.adametz.media@gmail.com', 'email_verified_at' => '2025-12-18 10:46:20', 'password' => '$2y$12$UXIpAVmxUAKerqhdXQt.gebMM/NEbSi713Fq69XsOpmnbbLMHIW/a', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2025-12-18 10:46:07', 'updated_at' => '2025-12-18 17:34:32', 'deleted_at' => null],
['id' => 17, 'partner_id' => 16, 'hub_id' => null, 'origin' => null, 'name' => 'Marcel Scheibe', 'display_name' => null, 'email' => 'marcel.scheibe@bridges2america.com', 'email_verified_at' => '2025-12-19 11:20:57', 'password' => '$2y$12$pw9PjzTmlWnC1wJ.ioD69OhcV8kxjQTDyKUk71rnP8kiweViEpeRe', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => 'pHLCoFTBHJet4D5aeoBGl20lNqOuXW1z4g5J7uiaSMFQU3jdXmWOAv5nMFH8', 'created_at' => '2025-12-19 11:20:57', 'updated_at' => '2026-01-14 10:35:09', 'deleted_at' => null],
['id' => 18, 'partner_id' => 17, 'hub_id' => null, 'origin' => null, 'name' => 'Marcel Scheibe', 'display_name' => 'TEST MS', 'email' => 'marcel_scheibe@web.de', 'email_verified_at' => '2026-01-14 10:47:04', 'password' => '$2y$12$b1wZQv9bBVet3RwzIU9uaubHmo7TTC/C/ECro.RBUSAy/CRKy/1AC', 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, 'two_factor_confirmed_at' => null, 'remember_token' => null, 'created_at' => '2026-01-14 10:45:37', 'updated_at' => '2026-01-14 10:47:04', 'deleted_at' => null],
]);
}
private function seedModelHasRoles(): void
{
DB::table('model_has_roles')->truncate();
DB::table('model_has_roles')->insert([
['role_id' => 1, 'model_type' => 'App\\Models\\User', 'model_id' => 12],
['role_id' => 1, 'model_type' => 'App\\Models\\User', 'model_id' => 13],
['role_id' => 2, 'model_type' => 'App\\Models\\User', 'model_id' => 14],
['role_id' => 2, 'model_type' => 'App\\Models\\User', 'model_id' => 18],
['role_id' => 3, 'model_type' => 'App\\Models\\User', 'model_id' => 15],
['role_id' => 4, 'model_type' => 'App\\Models\\User', 'model_id' => 11],
['role_id' => 4, 'model_type' => 'App\\Models\\User', 'model_id' => 16],
['role_id' => 5, 'model_type' => 'App\\Models\\User', 'model_id' => 1],
['role_id' => 5, 'model_type' => 'App\\Models\\User', 'model_id' => 17],
]);
}
private function seedBrands(): void
{
DB::table('brands')->truncate();
DB::table('brands')->insert([
['id' => 1, 'partner_id' => 15, 'name' => 'Moritz Möbel', 'slug' => 'moritz-mobel', 'logo_url' => null, 'description' => '', 'is_active' => 1, 'created_at' => '2025-12-18 10:55:57', 'updated_at' => '2025-12-18 17:53:22'],
['id' => 2, 'partner_id' => 10, 'name' => 'Möbelfritze', 'slug' => 'mobelfritze', 'logo_url' => null, 'description' => '', 'is_active' => 1, 'created_at' => '2025-12-18 13:10:19', 'updated_at' => '2025-12-18 17:57:05'],
]);
}
private function seedPartnerInvitations(): void
{
DB::table('partner_invitations')->truncate();
DB::table('partner_invitations')->insert([
['id' => 1, 'company_name' => 'Möbelhaus', 'contact_first_name' => 'Kevin', 'contact_last_name' => 'Adametz', 'role_id' => 3, 'email' => 'kevin.adametz@me.com', 'token' => 'CDfvxGVOOUhmGur6A0N7hWW7mZkfJUzT3kZGwjfxAmdWqnWJuvm79FilEjeKz19k', 'status' => 'pending', 'expires_at' => '2025-11-28 14:31:19', 'invited_by' => 1, 'partner_id' => null, 'accepted_at' => null, 'created_at' => '2025-11-21 14:31:19', 'updated_at' => '2025-11-21 14:31:19'],
['id' => 3, 'company_name' => 'Media Matters ', 'contact_first_name' => null, 'contact_last_name' => null, 'role_id' => 3, 'email' => 'register@adametz.media', 'token' => 'blUPdDvXCyYsuMrl6RmB6pr8PTrXnmBGUM3UdVFwjP1Wm88FoXTACXlV6FqeKvgv', 'status' => 'accepted', 'expires_at' => '2025-11-28 14:54:29', 'invited_by' => 1, 'partner_id' => 4, 'accepted_at' => '2025-11-21 15:01:16', 'created_at' => '2025-11-21 14:54:29', 'updated_at' => '2025-11-21 15:01:16'],
['id' => 5, 'company_name' => 'Max Möbelmann', 'contact_first_name' => null, 'contact_last_name' => null, 'role_id' => 1, 'email' => 'info3@adametz.media', 'token' => 'QhQLbYBa1TOOVEs2p7r4UMZ4PUb14O5KLoLQjhaZQCnX53lwpw9LG9zK3J8ADHGh', 'status' => 'accepted', 'expires_at' => '2025-12-25 09:45:27', 'invited_by' => 1, 'partner_id' => 11, 'accepted_at' => '2025-12-18 09:46:11', 'created_at' => '2025-12-18 09:45:27', 'updated_at' => '2025-12-18 09:46:11'],
['id' => 7, 'company_name' => 'Kevin Einladung', 'contact_first_name' => 'Kevin', 'contact_last_name' => 'Einladung', 'role_id' => 1, 'email' => 'register@adametz.media', 'token' => 'dDjcXk8pju5uxAOmQrzszssTdh06gO0k81nonZfwRggDFeNsLy1BIN8rMocigUcb', 'status' => 'accepted', 'expires_at' => '2025-12-26 11:14:21', 'invited_by' => 1, 'partner_id' => 16, 'accepted_at' => '2025-12-19 11:20:57', 'created_at' => '2025-12-19 11:14:21', 'updated_at' => '2025-12-19 11:20:57'],
['id' => 8, 'company_name' => 'Kevin Google Mail ', 'contact_first_name' => 'Kevin', 'contact_last_name' => 'Google', 'role_id' => 1, 'email' => 'kevin.adametz.media@gmail.com', 'token' => 'NIex1PbOgVlIL6GUfhq62QJx79yipDo3VcncBu23bSNukTmU4V3NUWlFsWX4L9L9', 'status' => 'pending', 'expires_at' => '2025-12-26 11:18:38', 'invited_by' => 1, 'partner_id' => null, 'accepted_at' => null, 'created_at' => '2025-12-19 11:18:38', 'updated_at' => '2025-12-19 11:18:38'],
]);
}
private function seedRegistrationCodes(): void
{
DB::table('registration_codes')->truncate();
DB::table('registration_codes')->insert([
['id' => 91, 'code' => 'M10000001', 'role' => 'broker', 'name' => 'Max Markler', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 5, 'used_by_user_id' => 6, 'used_at' => '2025-12-16 15:05:26', 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:08', 'updated_at' => '2025-12-16 15:05:26'],
['id' => 92, 'code' => 'K40000000', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 93, 'code' => 'K40000001', 'role' => 'customer', 'name' => null, 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => 9, 'used_by_user_id' => 10, 'used_at' => '2025-12-17 12:38:20', 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-17 12:38:20'],
['id' => 94, 'code' => 'K40000002', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 95, 'code' => 'K40000003', 'role' => 'customer', 'name' => null, 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => 12, 'used_by_user_id' => 13, 'used_at' => '2025-12-18 10:23:23', 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-18 10:23:23'],
['id' => 96, 'code' => 'K40000004', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 97, 'code' => 'K40000005', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 98, 'code' => 'K40000006', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 99, 'code' => 'K40000007', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 100, 'code' => 'K40000008', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 101, 'code' => 'K40000009', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 102, 'code' => 'K40000010', 'role' => 'customer', 'name' => null, 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => 91, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:08:58', 'updated_at' => '2025-12-16 14:08:58'],
['id' => 103, 'code' => 'M10000000', 'role' => 'broker', 'name' => 'test', 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 14:56:42', 'updated_at' => '2025-12-16 14:56:42'],
['id' => 104, 'code' => 'M10000002', 'role' => 'broker', 'name' => 'test', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 6, 'used_by_user_id' => 7, 'used_at' => '2025-12-16 16:29:03', 'expires_at' => '2025-12-23 23:59:59', 'metadata' => null, 'created_at' => '2025-12-16 16:25:28', 'updated_at' => '2025-12-16 16:29:03'],
['id' => 105, 'code' => 'P30000001', 'role' => 'manufacturer', 'name' => 'MHerr Steller', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 10, 'used_by_user_id' => 11, 'used_at' => '2025-12-18 08:11:34', 'expires_at' => '2025-12-25 23:59:59', 'metadata' => null, 'created_at' => '2025-12-18 08:09:04', 'updated_at' => '2025-12-18 08:11:34'],
['id' => 106, 'code' => 'M10000003', 'role' => 'broker', 'name' => 'mac ma', 'status' => 'available', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => null, 'used_by_user_id' => null, 'used_at' => null, 'expires_at' => '2025-12-25 23:59:59', 'metadata' => null, 'created_at' => '2025-12-18 10:29:41', 'updated_at' => '2025-12-18 10:29:41'],
['id' => 107, 'code' => 'P30000002', 'role' => 'manufacturer', 'name' => 'asdasd', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 15, 'used_by_user_id' => 16, 'used_at' => '2025-12-18 10:46:07', 'expires_at' => '2025-12-25 23:59:59', 'metadata' => null, 'created_at' => '2025-12-18 10:29:45', 'updated_at' => '2025-12-18 10:46:07'],
['id' => 108, 'code' => 'M10000004', 'role' => 'broker', 'name' => 'asd', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 13, 'used_by_user_id' => 14, 'used_at' => '2025-12-18 10:30:41', 'expires_at' => '2025-12-25 23:59:59', 'metadata' => null, 'created_at' => '2025-12-18 10:29:48', 'updated_at' => '2025-12-18 10:30:41'],
['id' => 109, 'code' => 'H20000001', 'role' => 'retailer', 'name' => 'asds', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 14, 'used_by_user_id' => 15, 'used_at' => '2025-12-18 10:37:29', 'expires_at' => '2025-12-25 23:59:59', 'metadata' => null, 'created_at' => '2025-12-18 10:36:54', 'updated_at' => '2025-12-18 10:37:29'],
['id' => 110, 'code' => 'M10000005', 'role' => 'broker', 'name' => 'TEST MS', 'status' => 'used', 'broker_partner_id' => null, 'assigned_to_code_id' => null, 'partner_id' => 17, 'used_by_user_id' => 18, 'used_at' => '2026-01-14 10:45:37', 'expires_at' => '2026-01-21 23:59:59', 'metadata' => null, 'created_at' => '2026-01-14 10:44:15', 'updated_at' => '2026-01-14 10:45:37'],
]);
}
private function seedDisplayVideos(): void
{
DB::table('display_videos')->truncate();
DB::table('display_videos')->insert([
['id' => 1, 'filename' => 'herbst_2025.mp4', 'title' => 'Herbst 2025', 'position' => 25, 'sort_order' => 2, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2026-01-06 12:23:48'],
['id' => 2, 'filename' => 'fruehjahr_2025.mp4', 'title' => 'Frühjahr 2025', 'position' => 10, 'sort_order' => 1, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2026-01-06 12:23:50'],
['id' => 3, 'filename' => 'fruehjahr_2024.mp4', 'title' => 'Frühjahr 2024', 'position' => 40, 'sort_order' => 0, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2026-01-31 15:28:23'],
['id' => 4, 'filename' => 'herbst_2024.mp4', 'title' => 'Herbst 2024', 'position' => 25, 'sort_order' => 3, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2025-12-18 13:19:22'],
]);
}
private function seedDisplayFooterContents(): void
{
DB::table('display_footer_contents')->truncate();
DB::table('display_footer_contents')->insert([
['id' => 1, 'headline' => 'Beratung & Termin', 'subline' => 'Jetzt Termin vereinbaren.', 'url' => 'https://www.cabinet.de/bielefeld?utm_source=store_display&utm_medium=qr_code&utm_campaign=bielefeld_pos&utm_content=termin_buchung#c39393', 'short_code' => 'c59kjb', 'clicks' => 6, 'sort_order' => 1, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2025-12-18 14:10:35'],
['id' => 2, 'headline' => 'Beratung vor Ort', 'subline' => 'Einfach reinkommen.', 'url' => 'https://www.cabinet.de/bielefeld?utm_source=store_display&utm_medium=qr_code&utm_campaign=bielefeld_pos&utm_content=termin_buchung#c39393', 'short_code' => '3bi07j', 'clicks' => 2, 'sort_order' => 2, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2025-12-18 14:10:33'],
['id' => 3, 'headline' => 'Pinterest', 'subline' => 'Inspirationen entdecken.', 'url' => 'https://de.pinterest.com/cabinet_AG/', 'short_code' => '1cl8so', 'clicks' => 0, 'sort_order' => 3, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2025-12-18 14:10:32'],
['id' => 4, 'headline' => 'Instagram', 'subline' => 'Tägliche Einblicke & Design.', 'url' => 'https://www.instagram.com/cabinet_schranksysteme/', 'short_code' => 'hz1tx2', 'clicks' => 0, 'sort_order' => 4, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2025-12-18 14:10:30'],
['id' => 5, 'headline' => 'Facebook', 'subline' => 'News, Aktionen & Community.', 'url' => 'https://de-de.facebook.com/cabinetschranksysteme/', 'short_code' => 'almb7t', 'clicks' => 0, 'sort_order' => 5, 'is_active' => 1, 'created_at' => '2025-12-18 13:19:22', 'updated_at' => '2025-12-18 14:10:29'],
]);
}
}

View file

@ -3,8 +3,8 @@
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
class RoleSeeder extends Seeder
{
@ -36,6 +36,7 @@ class RoleSeeder extends Seeder
'create products',
'edit products',
'delete products',
'curate products', // Produkte freigeben/ablehnen (Admin)
'manage rental options', // Miet-Parameter verwalten
// Order Management (für später)
@ -49,7 +50,7 @@ class RoleSeeder extends Seeder
// Frontend/Customer facing
'access dashboard', // Genereller Backend-Zugriff
'place orders' // Für Kunden
'place orders', // Für Kunden
];
// Erstelle Permissions
@ -73,7 +74,7 @@ class RoleSeeder extends Seeder
$customerRole->givePermissionTo([
'view products',
'place orders',
'view orders' // Eigene Bestellungen sehen
'view orders', // Eigene Bestellungen sehen
]);
// 2. Estate-Agent (Makler)
@ -90,7 +91,7 @@ class RoleSeeder extends Seeder
$estateAgentRole->givePermissionTo([
'access dashboard',
'view partners', // Damit sie sehen können, wen sie empfehlen
'view hubs'
'view hubs',
// Makler bekommen KEINE Produkt- oder Order-Rechte
]);
@ -113,7 +114,7 @@ class RoleSeeder extends Seeder
'delete products', // Später eingeschränkt auf EIGENE Produkte
'manage rental options',
'view orders', // Eigene Bestellungen
'manage orders' // Eigene Bestellungen
'manage orders', // Eigene Bestellungen
]);
// 4. Manufacturer (Hersteller)
@ -135,7 +136,7 @@ class RoleSeeder extends Seeder
'delete products', // Später eingeschränkt auf EIGENE Produkte
'manage rental options',
'view orders', // Eigene Bestellungen
'manage orders' // Eigene Bestellungen
'manage orders', // Eigene Bestellungen
]);
// 5. Admin (B2In Management / Marcel)
@ -144,7 +145,7 @@ class RoleSeeder extends Seeder
'display_name' => 'Admin (Administrator)',
'icon' => 'user-circle',
'color' => 'purple',
'can_be_invited' => false // Admins werden NICHT eingeladen
'can_be_invited' => false, // Admins werden NICHT eingeladen
]);
$adminRole->givePermissionTo([
'access dashboard',
@ -161,12 +162,13 @@ class RoleSeeder extends Seeder
'create products',
'edit products',
'delete products',
'curate products',
'manage rental options',
'view orders',
'manage orders',
'view users',
'manage users',
'manage roles'
'manage roles',
]);
// 6. Super-Admin (Entwickler)
@ -177,7 +179,7 @@ class RoleSeeder extends Seeder
'display_name' => 'Super-Admin (Entwickler)',
'icon' => 'shield-check',
'color' => 'red',
'can_be_invited' => false // Super-Admins werden NICHT eingeladen
'can_be_invited' => false, // Super-Admins werden NICHT eingeladen
]);
}
}

View file

@ -0,0 +1,67 @@
<?php
namespace Database\Seeders;
use App\Models\Setting;
use Illuminate\Database\Seeder;
class SettingsSeeder extends Seeder
{
public function run(): void
{
$settings = [
// Ticket-Einstellungen
[
'group' => 'tickets',
'key' => 'validity_days',
'value' => '30',
'type' => 'integer',
'description' => 'Gültigkeitsdauer eines Tickets in Tagen',
],
[
'group' => 'tickets',
'key' => 'receipt_upload_deadline_days',
'value' => '30',
'type' => 'integer',
'description' => 'Frist für den Beleg-Upload nach Ticket-Einlösung in Tagen',
],
[
'group' => 'tickets',
'key' => 'max_per_merchant_per_customer',
'value' => '3',
'type' => 'integer',
'description' => 'Max. Tickets pro Händler pro Kunde',
],
[
'group' => 'tickets',
'key' => 'max_merchants_per_customer',
'value' => '4',
'type' => 'integer',
'description' => 'Max. Händler pro Kunde pro Zeitraum',
],
// Provisions-Einstellungen
[
'group' => 'commissions',
'key' => 'default_broker_rate',
'value' => '0',
'type' => 'integer',
'description' => 'Standard-Makler-Provision in Prozent (individuell je Partner)',
],
[
'group' => 'commissions',
'key' => 'default_cashback_rate',
'value' => '0',
'type' => 'integer',
'description' => 'Standard-Kunden-Cashback in Prozent (individuell je Partner)',
],
];
foreach ($settings as $setting) {
Setting::query()->updateOrCreate(
['group' => $setting['group'], 'key' => $setting['key']],
$setting
);
}
}
}