14-04-2026

This commit is contained in:
Kevin Adametz 2026-04-14 18:07:45 +02:00
parent f58c709945
commit 0f82fea88a
72 changed files with 7414 additions and 148 deletions

View file

@ -0,0 +1,54 @@
<?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->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();
});
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('Kevin');
$table->timestamps();
});
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();
});
}
public function down(): void
{
Schema::dropIfExists('provider_uptime_logs');
Schema::dropIfExists('incident_activities');
Schema::dropIfExists('payment_incidents');
}
};