add rahyab notification service

This commit is contained in:
ehsan.moradi
2025-05-01 17:18:14 +03:30
parent 6d108e43c9
commit b573d1bbed
19 changed files with 1112 additions and 2 deletions
@@ -0,0 +1,37 @@
<?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('sms', function (Blueprint $table) {
$table->increments( 'id' );
$table->unsignedBigInteger( 'client_id' )->nullable();
$table->string( 'status' );
$table->string( 'message' , 100 );
$table->unsignedInteger( 'rel_id' );
$table->string( 'rel_type' , 50 );
$table->string( 'cell_number' , 20 );
$table->unsignedInteger( 'fee' )->default( 0 );
$table->unsignedInteger( 'sms_batch_id' );
$table->index( 'sms_batch_id' );
$table->integer( 'segment_count' )->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sms');
}
};
@@ -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('sms_batch', function (Blueprint $table) {
$table->increments( 'id' );
$table->string( 'category' );
$table->string( 'operator' , 100 );
$table->enum( 'type' , [ 'service' , 'simcard' , 'advertise' ] );
$table->string( 'code' , 40 );
$table->string( 'pattern' )->nullable();
$table->boolean( 'is_admin' )->default( 0 );
$table->boolean( 'is_systematic' )->default( 0 );
$table->string( 'from' )->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('sms_batch');
}
};