feat: legal sections

This commit is contained in:
2026-05-24 13:20:04 +02:00
parent 3a74c2c34d
commit 8b162c8e4c
24 changed files with 1145 additions and 0 deletions
@@ -0,0 +1,38 @@
<?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('legal_documents', function (Blueprint $table) {
$table->id();
$table->string('slug');
$table->string('type', 64);
$table->unsignedInteger('version');
$table->json('title');
$table->json('content');
$table->boolean('is_active')->default(false);
$table->timestamp('published_at')->nullable();
$table->timestamps();
$table->unique(['slug', 'version']);
$table->index(['slug', 'is_active', 'published_at']);
$table->index(['type', 'is_active', 'published_at']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('legal_documents');
}
};