14-04-2026
This commit is contained in:
parent
f58c709945
commit
0f82fea88a
72 changed files with 7414 additions and 148 deletions
|
|
@ -0,0 +1,62 @@
|
|||
<?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('payment_incidents', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->text('description')->nullable();
|
||||
$table->text('notes')->nullable();
|
||||
$table->enum('provider', ['payone', 'stripe', 'paypal', 'mollie', 'other'])->default('payone');
|
||||
$table->enum('type', ['outage', 'ipn_error', 'payment_failure', 'slow_response', 'other'])->default('other');
|
||||
$table->enum('status', ['open', 'in_progress', 'waiting_provider', 'resolved', 'closed'])->default('open');
|
||||
$table->enum('severity', ['low', 'medium', 'high', 'critical'])->default('medium');
|
||||
$table->integer('affected_orders')->default(0);
|
||||
$table->decimal('affected_revenue', 10, 2)->default(0);
|
||||
$table->timestamp('detected_at');
|
||||
$table->timestamp('resolved_at')->nullable();
|
||||
$table->string('ticket_number')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['provider', 'detected_at']);
|
||||
$table->index('status');
|
||||
});
|
||||
|
||||
Schema::create('incident_activities', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('incident_id')->constrained('payment_incidents')->onDelete('cascade');
|
||||
$table->enum('type', ['note', 'email', 'call', 'ticket', 'status_change', 'provider_response']);
|
||||
$table->string('title');
|
||||
$table->text('content')->nullable();
|
||||
$table->string('author')->default('System');
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('incident_id');
|
||||
});
|
||||
|
||||
Schema::create('provider_uptime_logs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->enum('provider', ['payone', 'stripe', 'paypal', 'mollie']);
|
||||
$table->boolean('is_up')->default(true);
|
||||
$table->integer('response_time_ms')->nullable();
|
||||
$table->text('error_message')->nullable();
|
||||
$table->timestamp('checked_at');
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['provider', 'checked_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('provider_uptime_logs');
|
||||
Schema::dropIfExists('incident_activities');
|
||||
Schema::dropIfExists('payment_incidents');
|
||||
}
|
||||
};
|
||||
|
|
@ -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('checkout_funnel_events', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->enum('event', [
|
||||
'checkout_visited',
|
||||
'form_submitted',
|
||||
'payment_initiated',
|
||||
'payment_returned',
|
||||
'payment_confirmed',
|
||||
])->index();
|
||||
|
||||
$table->string('session_id', 100)->nullable()->index();
|
||||
$table->string('domain', 200)->nullable();
|
||||
$table->unsignedBigInteger('shopping_user_id')->nullable()->index();
|
||||
$table->unsignedBigInteger('shopping_order_id')->nullable()->index();
|
||||
$table->unsignedBigInteger('shopping_payment_id')->nullable()->index();
|
||||
$table->unsignedBigInteger('consultant_user_id')->nullable()->index();
|
||||
|
||||
$table->string('payment_method', 50)->nullable();
|
||||
$table->string('return_status', 20)->nullable();
|
||||
$table->unsignedInteger('amount_cents')->nullable();
|
||||
|
||||
$table->json('metadata')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('checkout_funnel_events');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue