id(); $table->foreignId('company_id')->constrained()->cascadeOnDelete(); $table->string('reference')->unique(); $table->decimal('amount', 16, 2); $table->string('currency', 3)->default('EUR'); $table->string('counterparty'); $table->string('counterparty_country', 2)->nullable(); $table->string('channel')->nullable(); $table->dateTime('executed_at'); $table->unsignedTinyInteger('risk_score')->default(0); $table->string('status', 32)->index(); $table->boolean('requires_review')->default(true); $table->string('flagged_by')->nullable(); $table->text('flagged_reason')->nullable(); $table->json('signals')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('transactions'); } };