Regista abertura de propostas e actas imutaveis por versao

This commit is contained in:
2026-10-28 18:50:02 +02:00
parent 513f430edf
commit 07e775c492
21 changed files with 1404 additions and 4 deletions
@@ -0,0 +1,37 @@
<?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('proposal_openings', function (Blueprint $table) {
$table->id();
$table->foreignId('tenant_id')->constrained()->restrictOnDelete();
$table->foreignId('requisition_id')->constrained()->restrictOnDelete();
$table->foreignId('created_by')->constrained('users')->restrictOnDelete();
$table->unsignedInteger('revision');
$table->dateTime('opened_at');
$table->string('timezone', 64);
$table->dateTime('submission_deadline')->nullable();
$table->string('reference', 150);
$table->string('location', 300);
$table->text('reason');
$table->text('notes')->nullable();
$table->json('participants');
$table->json('annexes');
$table->json('snapshot');
$table->string('basis_hash', 64);
$table->timestamp('created_at');
$table->unique(['requisition_id', 'revision']);
});
}
public function down(): void
{
throw new LogicException('Preservar as actas e as suas versões.');
}
};