update marketing
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-14 11:55:22 +07:00
parent f80fcc4c1b
commit 05fd3230b8
448 changed files with 17545 additions and 5128 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('gateway_types', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->longText('inputs');
$table->string('namespace')->nullable();
$table->string('driver')->nullable();
$table->boolean('status')->default(1);
$table->string('channel')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('gateway_types');
}
};

View File

@@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('smsgateways', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
$table->foreignId('type_id')->constrained('gateway_types')->cascadeOnDelete();
$table->boolean('status')->default(1);
$table->string('driver')->nullable();
$table->string('channel')->nullable();
$table->string('namespace')->nullable();
$table->longText('params')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('smsgateways');
}
};

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('templates', function (Blueprint $table) {
$table->id();
$table->foreignId('business_id')->nullable()->constrained()->nullOnDelete();
$table->string('title');
$table->string('type'); // sms, whatsapp, email
$table->string('template')->nullable(); // for whatsapp only
$table->string('attachment')->nullable();
$table->string('subject')->nullable(); // for email only
$table->text('variables')->nullable();
$table->longText('message')->nullable();
$table->boolean('status')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('templates');
}
};

View File

@@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('message_reports', function (Blueprint $table) {
$table->id();
$table->string('title')->nullable();
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
$table->foreignId('template_id')->nullable()->constrained()->nullOnDelete();
$table->foreignId('smsgateway_id')->nullable()->constrained()->nullOnDelete();
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); // Send To
$table->string('channel'); // sms, whatsapp, email
$table->string('phone')->nullable();
$table->longText('message')->nullable();
$table->string('attachment')->nullable();
$table->timestamp('send_at')->nullable();
$table->enum('status', ['pending', 'success', 'failed'])->default('pending');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('message_reports');
}
};

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('email_settings', function (Blueprint $table) {
$table->id();
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
$table->enum('driver', ['smtp', 'sendmail'])->default('smtp');
$table->string('host')->nullable();
$table->string('port')->nullable();
$table->string('username')->nullable();
$table->string('password')->nullable();
$table->string('encryption')->nullable();
$table->string('from_name')->nullable();
$table->string('from_address')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('email_settings');
}
};