Grundgerüst Formulare und Seeder

This commit is contained in:
2026-02-08 17:40:03 +00:00
parent 59fe129fd0
commit 3e765576bf
41 changed files with 914 additions and 94 deletions

View File

@@ -16,8 +16,9 @@ return new class extends Migration
$table->id();
$table->string('name');
$table->string('type');
$table->foreignIdFor(User::class, 'responsible');
$table->morphs('contractable');
$table->foreignIdFor(User::class, 'responsible_id');
$table->integer('contractable_id')->nullable();
$table->string('contractable_type')->nullable();
$table->timestamps();
});
}

View File

@@ -0,0 +1,30 @@
<?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('documentpermissions', function (Blueprint $table) {
$table->id();
$table->string("type");
$table->string("class");
$table->string("acl");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('documentpermissions');
}
};

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::create('contactgroups', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contactgroups');
}
};

View File

@@ -0,0 +1,27 @@
<?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('contactgroupables', function (Blueprint $table) {
$table->foreignId('contactgroup_id')->constrained();
$table->morphs('contactgroupable');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contactgroupables');
}
};