feat(portal): lead module, WHMCS sync report/contacts/mapping, service lifecycle email templates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-21 16:55:19 +07:00
co-authored by Claude Sonnet 5.5
parent 3c7710f1de
commit a443ec3bf6
66 changed files with 2032 additions and 124 deletions
@@ -0,0 +1,38 @@
<?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('leads', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->unique();
$table->unsignedBigInteger('legacy_id')->nullable()->unique();
$table->foreignId('customer_id')->nullable()->constrained('customers')->nullOnDelete();
$table->unsignedBigInteger('whmcs_client_id')->nullable();
$table->string('fullname')->nullable();
$table->string('company')->nullable();
$table->string('email')->unique();
$table->string('phone', 30)->nullable();
$table->text('address')->nullable();
$table->string('source', 30)->default('manual');
$table->string('status', 20)->default('new')->index();
$table->boolean('receives_invoice_emails')->default(false);
$table->boolean('receives_domain_emails')->default(false);
$table->boolean('receives_support_emails')->default(false);
$table->boolean('receives_product_emails')->default(false);
$table->boolean('receives_general_emails')->default(false);
$table->text('note')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('leads');
}
};