ein paar test-objekte

This commit is contained in:
2026-02-08 15:06:29 +00:00
parent 4acd50f6cd
commit bf40de87ca
10 changed files with 101 additions and 7 deletions

View File

@@ -14,6 +14,7 @@ return new class extends Migration
Schema::create('documents', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('type');
$table->morphs('documentable');
$table->timestamps();
});

View File

@@ -1,5 +1,6 @@
<?php
use App\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
@@ -13,6 +14,10 @@ return new class extends Migration
{
Schema::create('contracts', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('type');
$table->foreignIdFor(User::class, 'responsible');
$table->morphs('contractable');
$table->timestamps();
});
}

View File

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