Add all files
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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('ext_contact_messages', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->string('subject')->nullable();
|
||||
$table->text('message');
|
||||
$table->string('status')->default('unread'); // unread, read, replied, archived
|
||||
$table->text('admin_notes')->nullable();
|
||||
$table->string('ip_address')->nullable();
|
||||
$table->string('user_agent')->nullable();
|
||||
$table->timestamp('read_at')->nullable();
|
||||
$table->timestamp('replied_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['status', 'created_at']);
|
||||
$table->index('email');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ext_contact_messages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('ext_abuse_reports', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->id();
|
||||
$table->string('reporter_name');
|
||||
$table->string('reporter_email');
|
||||
$table->string('abuse_type'); // spam, harassment, copyright, illegal_content, other
|
||||
$table->string('reported_url')->nullable();
|
||||
$table->string('reported_user')->nullable();
|
||||
$table->text('description');
|
||||
$table->text('evidence')->nullable(); // Additional evidence or details
|
||||
$table->string('status')->default('pending'); // pending, investigating, resolved, dismissed
|
||||
$table->text('admin_notes')->nullable();
|
||||
$table->string('ip_address')->nullable();
|
||||
$table->string('user_agent')->nullable();
|
||||
$table->timestamp('investigated_at')->nullable();
|
||||
$table->timestamp('resolved_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['status', 'created_at']);
|
||||
$table->index(['abuse_type', 'status']);
|
||||
$table->index('reporter_email');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ext_abuse_reports');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user