commit2
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-28 14:35:06 +02:00
parent 332cb9f1b7
commit 70163c0184
18 changed files with 1036 additions and 2 deletions
@@ -0,0 +1,43 @@
<?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('supplier_bank_details', function (Blueprint $table) {
$table->id();
$table->foreignId('tenant_id')->constrained()->restrictOnDelete();
$table->foreignId('supplier_id')->constrained()->restrictOnDelete();
$table->foreignId('created_by')->constrained('users')->restrictOnDelete();
$table->unsignedInteger('revision');
$table->string('bank_name', 200);
$table->string('country', 2);
$table->string('currency', 3);
$table->text('beneficiary');
$table->text('account_identifier');
$table->text('evidence_reference');
$table->text('reason');
$table->timestamp('created_at');
$table->unique(['supplier_id', 'revision']);
});
Schema::create('supplier_bank_reviews', function (Blueprint $table) {
$table->id();
$table->foreignId('tenant_id')->constrained()->restrictOnDelete();
$table->foreignId('supplier_bank_detail_id')->constrained()->restrictOnDelete();
$table->foreignId('reviewed_by')->constrained('users')->restrictOnDelete();
$table->string('decision');
$table->text('reason');
$table->timestamp('created_at');
$table->unique(['supplier_bank_detail_id', 'reviewed_by']);
});
}
public function down(): void
{
throw new LogicException('Preservar versões bancárias e validações.');
}
};