migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*/
|
||||
protected $model = \Modules\Authentication\Models\User::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'first_name' => $this->faker->name(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'password' => Hash::make('12345678'), // default password for testing
|
||||
'phone' => $this->faker->unique()->phoneNumber(),
|
||||
'avatar' => asset('uploads/user/admin-avatar.png'),
|
||||
'role_id' => 1, // default role
|
||||
'email_verified_at' => now(),
|
||||
'status' => 1, // default status
|
||||
'qr_code' => (string) mt_rand(10000000, 99999999).mt_rand(10000000, 99999999),
|
||||
'user_type' => 'Admin', // default user type
|
||||
'facebook' => $this->faker->url(),
|
||||
'twitter' => $this->faker->url(),
|
||||
'linkedin' => $this->faker->url(),
|
||||
'google_plus' => $this->faker->url(),
|
||||
'remember_token' => Str::random(10),
|
||||
'platform' => 'WEB',
|
||||
'address' => 'Dhaka, Bangladesh',
|
||||
'created_by' => 1,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
'deleted_at' => null, // no soft delete by default
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<?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('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('restaurant_id')->nullable();
|
||||
$table->string('first_name');
|
||||
$table->string('last_name')->nullable();
|
||||
$table->string('username')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone', 50);
|
||||
$table->string('password')->nullable();
|
||||
$table->integer('otp_code')->nullable();
|
||||
$table->integer('isVerified')->nullable();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->tinyInteger('role_id')->default(1)->comment('1=super-admin, 2=admin, 3=owner, 4=waiter');
|
||||
$table->string('user_type', 20)->default('waiter');
|
||||
$table->mediumText('address')->nullable();
|
||||
$table->string('avatar')->nullable();
|
||||
$table->string('facebook', 192)->nullable();
|
||||
$table->string('twitter', 192)->nullable();
|
||||
$table->string('linkedin', 192)->nullable();
|
||||
$table->string('google_plus', 192)->nullable();
|
||||
$table->string('nid')->nullable();
|
||||
$table->enum('platform', ['APP', 'WEB'])->default('APP');
|
||||
$table->longText('device_info')->nullable();
|
||||
$table->timestamp('last_active_time')->nullable();
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
|
||||
// FOR Employee
|
||||
$table->unsignedBigInteger('department_id')->nullable();
|
||||
$table->unsignedBigInteger('designation_id')->nullable();
|
||||
$table->unsignedBigInteger('salary_type_id')->nullable();
|
||||
|
||||
// 🏠 Personal Details
|
||||
$table->enum('gender', ['male', 'female', 'other'])->nullable();
|
||||
$table->date('date_of_birth')->nullable();
|
||||
|
||||
// 💼 Job Info
|
||||
$table->date('joining_date')->nullable();
|
||||
$table->decimal('basic_salary', 12, 2)->nullable()->default(0);
|
||||
|
||||
$table->string('bio')->nullable();
|
||||
$table->string('fcm_token')->nullable();
|
||||
$table->string('qr_code', 32)->nullable()->index();
|
||||
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index('restaurant_id'); // Filter users by restaurant
|
||||
$table->index('status'); // Filter active/inactive users
|
||||
$table->index('user_type'); // Filter by user type
|
||||
$table->index('phone'); // Search by phone
|
||||
$table->index('first_name'); // Search by first name
|
||||
|
||||
// Composite indexes for frequent searches
|
||||
$table->index(['restaurant_id', 'status']);
|
||||
$table->index(['restaurant_id', 'user_type']);
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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('zones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('restaurant_id')->nullable();
|
||||
$table->string('name');
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('zones');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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('restaurants', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('owner_id')->nullable()->constrained('users')->cascadeOnDelete();
|
||||
$table->foreignId('assigned_to')->nullable()->constrained('users')->cascadeOnDelete();
|
||||
$table->string('name', 100);
|
||||
$table->string('email')->nullable()->unique();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('restaurant_type', 100)->nullable();
|
||||
$table->string('phone', 15)->unique()->nullable();
|
||||
$table->string('domain', 100)->unique()->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
|
||||
$table->foreignId('zone_id')->nullable();
|
||||
$table->decimal('latitude', 10, 7)->nullable();
|
||||
$table->decimal('longitude', 10, 7)->nullable();
|
||||
$table->decimal('delivery_radius_km', 8, 2)->default(5.00);
|
||||
$table->boolean('is_verified')->default(false);
|
||||
$table->boolean('is_open')->default(true);
|
||||
|
||||
$table->enum('platform', ['WEB', 'APP'])->default('APP');
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->unsignedBigInteger('theme_id')->nullable();
|
||||
$table->timestamp('last_active_time')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('restaurants');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use App\Enum\ActionStatus;
|
||||
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('user_logs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('restaurant_id')->constrained('restaurants')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained('users')->comment('Which User do this action');
|
||||
$table->string('ip_address')->nullable();
|
||||
$table->enum('action', ActionStatus::values())
|
||||
->default(ActionStatus::Create->value);
|
||||
$table->string('detail')->nullable();
|
||||
$table->string('previous_detail')->nullable();
|
||||
$table->string('model')->nullable();
|
||||
$table->unsignedBigInteger('model_id')->nullable();
|
||||
$table->string('url')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['user_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_logs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('restaurant_id')->nullable();
|
||||
$table->string('setting_type')->nullable()->default('Admin')->comment('Admin , Restaurant');
|
||||
$table->string('type');
|
||||
$table->string('option_key');
|
||||
$table->mediumText('option_value')->nullable();
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
// UNIQUE: one option_key per restaurant
|
||||
$table->unique(['restaurant_id', 'option_key'], 'restaurant_option_unique');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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('packages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 50);
|
||||
$table->decimal('price', 10, 2)->default(0.00);
|
||||
$table->enum('package_type', ['recurring', 'one_time'])->default('recurring');
|
||||
$table->enum('audience_type', ['custom', 'standard'])->default('custom');
|
||||
$table->integer('duration')->unsigned()->default(0)->comment('Duration in days');
|
||||
$table->boolean('auto_renew')->default(true);
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=Inactive');
|
||||
|
||||
// Limits
|
||||
$table->integer('max_food_items')->unsigned()->default(0);
|
||||
$table->integer('max_categories')->unsigned()->default(0);
|
||||
$table->integer('max_food_item_attributes')->unsigned()->default(0);
|
||||
$table->integer('employee_limit')->unsigned()->default(0);
|
||||
$table->integer('order_limit')->unsigned()->default(0);
|
||||
$table->integer('storage_limit')->unsigned()->default(0);
|
||||
|
||||
// Features
|
||||
$table->boolean('sms_management_enabled')->default(false);
|
||||
$table->boolean('chat_enable')->default(false);
|
||||
$table->boolean('landing_page_enable')->default(false);
|
||||
$table->boolean('blog_enable')->default(false);
|
||||
$table->integer('extra_buffer_time')->default(0);
|
||||
|
||||
// Flexible features for future upgrades
|
||||
$table->json('extra_features')->nullable()->comment('Store new features in JSON');
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('packages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('subscriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained('users')->cascadeOnDelete();
|
||||
$table->foreignId('restaurant_id')->constrained('restaurants')->cascadeOnDelete();
|
||||
$table->foreignId('package_id')->constrained('packages')->cascadeOnDelete();
|
||||
$table->dateTime('start_date')->nullable();
|
||||
$table->dateTime('end_date')->nullable();
|
||||
$table->text('transactions_details')->nullable();
|
||||
$table->integer('click_count')->default(0);
|
||||
$table->integer('max_clicks')->default(100);
|
||||
$table->integer('extra_buffer_time')->nullable()->comment('Extra time in days for subscription extension/grace period');
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=Inactive');
|
||||
|
||||
// Flexible for future expansion
|
||||
$table->json('meta')->nullable()->comment('Additional data for future upgrades');
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('subscriptions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
<?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('subscription_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained('users')->cascadeOnDelete();
|
||||
$table->foreignId('restaurant_id')->constrained('restaurants')->cascadeOnDelete();
|
||||
$table->foreignId('subscription_id')->constrained('subscriptions')->cascadeOnDelete();
|
||||
$table->foreignId('package_id')->nullable()->constrained('packages')->cascadeOnDelete();
|
||||
|
||||
$table->decimal('amount', 10, 2)->default(0.00);
|
||||
$table->dateTime('start_date')->nullable();
|
||||
$table->dateTime('end_date')->nullable();
|
||||
$table->text('transactions_details')->nullable();
|
||||
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=Inactive');
|
||||
|
||||
// Future flexibility
|
||||
$table->json('meta')->nullable()->comment('Additional data for future upgrades');
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('subscription_items');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,148 @@
|
||||
<?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
|
||||
{
|
||||
$teams = config('permission.teams');
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
$pivotRole = $columnNames['role_pivot_key'] ?? 'role_id';
|
||||
$pivotPermission = $columnNames['permission_pivot_key'] ?? 'permission_id';
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
|
||||
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], static function (Blueprint $table) {
|
||||
// $table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // permission id
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], static function (Blueprint $table) use ($teams, $columnNames) {
|
||||
// $table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // role id
|
||||
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
|
||||
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||
}
|
||||
$table->foreignId('restaurant_id')->nullable();
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
if ($teams || config('permission.testing')) {
|
||||
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
|
||||
} else {
|
||||
$table->unique(['name', 'guard_name']);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
|
||||
|
||||
$table->primary(
|
||||
[$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary'
|
||||
);
|
||||
} else {
|
||||
$table->primary(
|
||||
[$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
|
||||
|
||||
$table->primary(
|
||||
[$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary'
|
||||
);
|
||||
} else {
|
||||
$table->primary(
|
||||
[$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], static function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
}
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('feedback', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained('users')->cascadeOnDelete();
|
||||
$table->text('description')->nullable();
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('feedback');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('s_a_a_s_faqs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('question', 255);
|
||||
$table->longText('answer')->nullable();
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('s_a_a_s_faqs');
|
||||
}
|
||||
};
|
||||
@@ -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('subscription_upgrade_requests', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('restaurant_id')->constrained()->onDelete('cascade');
|
||||
$table->foreignId('package_id')->constrained()->onDelete('cascade');
|
||||
$table->integer('extra_days')->default(0);
|
||||
$table->decimal('amount_paid', 10, 2)->default(0);
|
||||
$table->string('payment_method')->nullable();
|
||||
$table->string('notes')->nullable();
|
||||
$table->enum('status', ['pending', 'approved', 'rejected'])->default('pending');
|
||||
$table->unsignedBigInteger('approved_by')->nullable();
|
||||
$table->timestamp('approved_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('subscription_upgrade_requests');
|
||||
}
|
||||
};
|
||||
@@ -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('s_a_a_s_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 50);
|
||||
$table->longText('value')->nullable();
|
||||
$table->longText('payment_info')->nullable();
|
||||
$table->longText('sms_info')->nullable();
|
||||
$table->string('type')->nullable()->default('general');
|
||||
$table->string('mode')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('s_a_a_s_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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('s_a_a_s_subscriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('email')->unique();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('s_a_a_s_subscriptions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('galleries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('image'); // Full public path
|
||||
$table->string('type')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('galleries');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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('zoom_meetings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('restaurant_id')->constrained('restaurants')->cascadeOnDelete();
|
||||
$table->string('meeting_id');
|
||||
$table->text('topic');
|
||||
$table->text('agenda')->nullable();
|
||||
$table->string('start_time');
|
||||
$table->integer('duration')->nullable();
|
||||
$table->string('password')->nullable();
|
||||
$table->longText('join_url');
|
||||
$table->longText('start_url');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
// Combine unique constraint
|
||||
$table->unique(['restaurant_id', 'meeting_id'], 'unique_combination');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('zoom_meetings');
|
||||
}
|
||||
};
|
||||
@@ -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
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('oauth_auth_codes', function (Blueprint $table) {
|
||||
$table->char('id', 80)->primary();
|
||||
$table->foreignId('user_id')->index();
|
||||
$table->foreignUuid('client_id');
|
||||
$table->text('scopes')->nullable();
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('oauth_auth_codes');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return $this->connection ?? config('passport.connection');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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('oauth_access_tokens', function (Blueprint $table) {
|
||||
$table->char('id', 80)->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->foreignUuid('client_id');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('scopes')->nullable();
|
||||
$table->boolean('revoked');
|
||||
$table->timestamps();
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('oauth_access_tokens');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return $this->connection ?? config('passport.connection');
|
||||
}
|
||||
};
|
||||
@@ -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('oauth_refresh_tokens', function (Blueprint $table) {
|
||||
$table->char('id', 80)->primary();
|
||||
$table->char('access_token_id', 80)->index();
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('oauth_refresh_tokens');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return $this->connection ?? config('passport.connection');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('oauth_clients', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->nullableMorphs('owner');
|
||||
$table->string('name');
|
||||
$table->string('secret')->nullable();
|
||||
$table->string('provider')->nullable();
|
||||
$table->text('redirect_uris');
|
||||
$table->text('grant_types');
|
||||
$table->boolean('revoked');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('oauth_clients');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return $this->connection ?? config('passport.connection');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('oauth_device_codes', function (Blueprint $table) {
|
||||
$table->char('id', 80)->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->foreignUuid('client_id')->index();
|
||||
$table->char('user_code', 8)->unique();
|
||||
$table->text('scopes');
|
||||
$table->boolean('revoked');
|
||||
$table->dateTime('user_approved_at')->nullable();
|
||||
$table->dateTime('last_polled_at')->nullable();
|
||||
$table->dateTime('expires_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('oauth_device_codes');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return $this->connection ?? config('passport.connection');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('oauth_personal_access_clients', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->unsignedBigInteger('client_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('oauth_personal_access_clients');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('languages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name'); // e.g., English, Bengali
|
||||
$table->string('code', 10)->unique(); // e.g., en, bn
|
||||
$table->string('flag')->nullable(); // optional flag image path or emoji
|
||||
$table->string('file_path'); // path to JSON language file
|
||||
$table->boolean('is_default')->default(false); // default language
|
||||
$table->enum('status', ['active', 'inactive'])->default('active'); // active/inactive
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('languages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('restaurant_image_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('restaurant_id')->nullable();
|
||||
// logos & banners
|
||||
$table->string('header_logo_light_theme')->nullable();
|
||||
$table->string('header_logo_dark_theme')->nullable();
|
||||
$table->string('footer_logo_light_theme')->nullable();
|
||||
$table->string('footer_logo_dark_theme')->nullable();
|
||||
$table->string('banner_image')->nullable();
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('restaurant_image_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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('restaurant_image_s_a_a_s_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
// logos & banners
|
||||
$table->string('header_logo_light_theme')->nullable();
|
||||
$table->string('header_logo_dark_theme')->nullable();
|
||||
$table->string('footer_logo_light_theme')->nullable();
|
||||
$table->string('footer_logo_dark_theme')->nullable();
|
||||
$table->string('banner_image')->nullable();
|
||||
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('restaurant_image_s_a_a_s_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AuthenticationDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$this->call([UtilitySeeder::class]);
|
||||
$this->call([FeedbackTableSeeder::class]);
|
||||
$this->call([SAASFaqSeeder::class]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\Authentication\Models\Feedback;
|
||||
|
||||
class FeedbackTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
Feedback::create([
|
||||
'user_id' => 1,
|
||||
'description' => 'I love learning here! The teachers are supportive, and the activities are fun.',
|
||||
'status' => 1,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
]);
|
||||
|
||||
Feedback::create([
|
||||
'user_id' => 2,
|
||||
'description' => 'A great place to teach! The school values both students and educators.',
|
||||
'status' => 1,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
]);
|
||||
|
||||
Feedback::create([
|
||||
'user_id' => 3,
|
||||
'description' => 'The best decision for my child! Excellent education and communication.',
|
||||
'status' => 1,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PackageSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$now = Carbon::now();
|
||||
|
||||
$packages = [
|
||||
[
|
||||
'name' => 'Silver',
|
||||
'price' => 29.99,
|
||||
'package_type' => 'recurring',
|
||||
'audience_type' => 'standard',
|
||||
'duration' => 30, // 30 days
|
||||
'auto_renew' => true,
|
||||
'is_active' => true,
|
||||
'status' => 1,
|
||||
'max_food_items' => 50,
|
||||
'max_categories' => 5,
|
||||
'max_food_item_attributes' => 100,
|
||||
'employee_limit' => 3,
|
||||
'order_limit' => 500,
|
||||
'storage_limit' => 1024, // in MB
|
||||
'sms_management_enabled' => true,
|
||||
'chat_enable' => false,
|
||||
'landing_page_enable' => false,
|
||||
'blog_enable' => false,
|
||||
'extra_buffer_time' => 7,
|
||||
'extra_features' => json_encode([
|
||||
'support_priority' => 'low',
|
||||
'analytics_dashboard' => true,
|
||||
]),
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'name' => 'Gold',
|
||||
'price' => 79.99,
|
||||
'package_type' => 'recurring',
|
||||
'audience_type' => 'standard',
|
||||
'duration' => 30, // 30 days
|
||||
'auto_renew' => true,
|
||||
'is_active' => true,
|
||||
'status' => 1,
|
||||
'max_food_items' => 200,
|
||||
'max_categories' => 20,
|
||||
'max_food_item_attributes' => 500,
|
||||
'employee_limit' => 10,
|
||||
'order_limit' => 2000,
|
||||
'storage_limit' => 5120, // in MB
|
||||
'sms_management_enabled' => true,
|
||||
'chat_enable' => true,
|
||||
'landing_page_enable' => true,
|
||||
'blog_enable' => false,
|
||||
'extra_buffer_time' => 7,
|
||||
'extra_features' => json_encode([
|
||||
'support_priority' => 'medium',
|
||||
'analytics_dashboard' => true,
|
||||
'custom_reports' => true,
|
||||
]),
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
[
|
||||
'name' => 'Platinum',
|
||||
'price' => 149.99,
|
||||
'package_type' => 'recurring',
|
||||
'audience_type' => 'custom',
|
||||
'duration' => 30, // 30 days
|
||||
'auto_renew' => true,
|
||||
'is_active' => true,
|
||||
'status' => 1,
|
||||
'max_food_items' => 1000,
|
||||
'max_categories' => 50,
|
||||
'max_food_item_attributes' => 5000,
|
||||
'employee_limit' => 50,
|
||||
'order_limit' => 10000,
|
||||
'storage_limit' => 20480, // in MB
|
||||
'sms_management_enabled' => true,
|
||||
'chat_enable' => true,
|
||||
'landing_page_enable' => true,
|
||||
'blog_enable' => true,
|
||||
'extra_buffer_time' => 7,
|
||||
'extra_features' => json_encode([
|
||||
'support_priority' => 'high',
|
||||
'analytics_dashboard' => true,
|
||||
'custom_reports' => true,
|
||||
'api_access' => true,
|
||||
'white_label' => true,
|
||||
]),
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
],
|
||||
];
|
||||
|
||||
DB::table('packages')->insert($packages);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class RestaurantTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('restaurants')->insert([
|
||||
[
|
||||
'owner_id' => 2,
|
||||
'assigned_to' => 1,
|
||||
'name' => 'Star Kabab & Restaurant',
|
||||
'address' => 'House 1, Road 2, Dhanmondi, Dhaka 1205',
|
||||
'restaurant_type' => 'Restaurant',
|
||||
'phone' => '01712345678',
|
||||
'domain' => 'starkabab.com',
|
||||
'platform' => 'WEB',
|
||||
'last_active_time' => Carbon::now(),
|
||||
'status' => 1,
|
||||
'theme_id' => 1,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\Authentication\Models\SAASFaq;
|
||||
|
||||
class SAASFaqSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
SAASFaq::insert([
|
||||
[
|
||||
'question' => 'What is an academic program?',
|
||||
'answer' => 'The academic program is a one stop solution for students. Where every student has the opportunity to ensure A+ preparation for board exams through interactive live classes, homework, live tests and progress analysis by the best mentors in each subject throughout the year. Once a student starts this program, he will not have to go to any coaching or private tutor after school/college.',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
[
|
||||
'question' => 'What is an academic program?',
|
||||
'answer' => 'The academic program is a one stop solution for students. Where every student has the opportunity to ensure A+ preparation for board exams through interactive live classes, homework, live tests and progress analysis by the best mentors in each subject throughout the year. Once a student starts this program, he will not have to go to any coaching or private tutor after school/college.',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
[
|
||||
'question' => 'What is an academic program?',
|
||||
'answer' => 'The academic program is a one stop solution for students. Where every student has the opportunity to ensure A+ preparation for board exams through interactive live classes, homework, live tests and progress analysis by the best mentors in each subject throughout the year. Once a student starts this program, he will not have to go to any coaching or private tutor after school/college.',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\Authentication\Models\Setting;
|
||||
|
||||
class SettingSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$restaurantId = 1;
|
||||
|
||||
$settings = [
|
||||
// 🏠 General Information
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'restaurant_name', 'option_value' => 'Restaurant'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'site_title', 'option_value' => 'restaurant'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'phone', 'option_value' => '01XXXXXXXXX'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'email', 'option_value' => 'restaurant@gmail.com'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'language', 'option_value' => 'en'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'google_map', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'address', 'option_value' => 'Asia,Dhaka-1219'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'on_google_map', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'restaurant_code', 'option_value' => '987654'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'currency_symbol', 'option_value' => '$'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'logo', 'option_value' => 'logo.png'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'mail_type', 'option_value' => 'mail'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'disabled_website', 'option_value' => 'no'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'copyright_text', 'option_value' => '© Copyright 2025. All Rights Reserved by FueDevs LTD'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'facebook_link', 'option_value' => 'https://www.facebook.com/'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'google_plus_link', 'option_value' => 'https://www.google.com/'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'youtube_link', 'option_value' => 'https://www.youtube.com/'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'whats_app_link', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'twitter_link', 'option_value' => 'https://www.twitter.com'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'eiin_code', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'sms_gateway', 'option_value' => 'twilio'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'bulk_sms_api_key', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'bulk_sms_sender_id', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'twilio_sid', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'twilio_token', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'twilio_from_number', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'header_notice', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'app_version', 'option_value' => '1.0.0'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'app_url', 'option_value' => 'drive-link'],
|
||||
|
||||
// 🎨 Restaurant Identity & Display
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'tagline', 'option_value' => 'Delicious Food, Fresh Taste'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'favicon', 'option_value' => 'favicon.png'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'theme_color', 'option_value' => '#ff6b00'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'general', 'option_key' => 'background_image', 'option_value' => 'bg.jpg'],
|
||||
|
||||
// 💰 Finance / POS / Invoice
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'tax_type', 'option_value' => 'exclusive'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'tax_percentage', 'option_value' => '10'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'service_charge', 'option_value' => '5'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'default_currency', 'option_value' => 'USD'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'billing_prefix', 'option_value' => 'INV-'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'invoice_footer', 'option_value' => 'Thank you! Visit again.'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'enable_kitchen_print', 'option_value' => 'yes'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'pos', 'option_key' => 'enable_customer_copy', 'option_value' => 'yes'],
|
||||
|
||||
// 🚚 Online Ordering & Delivery
|
||||
['restaurant_id' => $restaurantId, 'type' => 'order', 'option_key' => 'enable_online_order', 'option_value' => 'yes'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'order', 'option_key' => 'delivery_charge', 'option_value' => '50'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'order', 'option_key' => 'minimum_order_amount', 'option_value' => '100'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'order', 'option_key' => 'auto_accept_order', 'option_value' => 'no'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'order', 'option_key' => 'estimated_preparation_time', 'option_value' => '30'],
|
||||
|
||||
// 🔔 Notifications / Integrations
|
||||
['restaurant_id' => $restaurantId, 'type' => 'integration', 'option_key' => 'slack_webhook_url', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'integration', 'option_key' => 'telegram_bot_token', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'integration', 'option_key' => 'telegram_chat_id', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'integration', 'option_key' => 'twilio_sms_enabled', 'option_value' => 'yes'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'integration', 'option_key' => 'email_notifications', 'option_value' => 'yes'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'integration', 'option_key' => 'whatsapp_notifications', 'option_value' => 'no'],
|
||||
|
||||
// 🧾 Reports & Logs
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system', 'option_key' => 'auto_backup', 'option_value' => 'daily'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system', 'option_key' => 'report_timezone', 'option_value' => 'Asia/Dhaka'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system', 'option_key' => 'data_retention_days', 'option_value' => '365'],
|
||||
|
||||
// 💻 UI/UX Preferences
|
||||
['restaurant_id' => $restaurantId, 'type' => 'ui', 'option_key' => 'sidebar_collapsed', 'option_value' => 'no'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'ui', 'option_key' => 'dark_mode', 'option_value' => 'no'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'ui', 'option_key' => 'default_dashboard', 'option_value' => 'sales'],
|
||||
|
||||
// 💳 Payment Gateways
|
||||
['restaurant_id' => $restaurantId, 'type' => 'payment', 'option_key' => 'razorpay_key', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'payment', 'option_key' => 'razorpay_secret', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'payment', 'option_key' => 'stripe_key', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'payment', 'option_key' => 'stripe_secret', 'option_value' => ''],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'payment', 'option_key' => 'cash_on_delivery', 'option_value' => 'yes'],
|
||||
|
||||
// 👨🍳 Kitchen & Staff
|
||||
['restaurant_id' => $restaurantId, 'type' => 'staff', 'option_key' => 'max_table_capacity', 'option_value' => '10'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'staff', 'option_key' => 'default_shift_start', 'option_value' => '09:00'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'staff', 'option_key' => 'default_shift_end', 'option_value' => '23:00'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'staff', 'option_key' => 'auto_logout_idle_minutes', 'option_value' => '60'],
|
||||
|
||||
// 🎨 Color Combination
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'primary_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'secondary_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'primary_container_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'dark_primary_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'dark_secondary_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'dark_container_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'text_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'dark_text_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'sidebar_selected_bg_color', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system_color', 'option_key' => 'sidebar_selected_text_color', 'option_value' => null],
|
||||
|
||||
// 🚚 Delivery / Online features
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'is_online', 'option_value' => false],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'latitude', 'option_value' => '23.8103'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'longitude', 'option_value' => '90.4125'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'delivery_radius_km', 'option_value' => 5.00],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'delivery_fee', 'option_value' => 0],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'delivery_partner_count', 'option_value' => 0],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'delivery_time_avg', 'option_value' => 30],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'delivery', 'option_key' => 'pickup_enabled', 'option_value' => true],
|
||||
|
||||
// 🕒 Operational hours & capacity
|
||||
['restaurant_id' => $restaurantId, 'type' => 'operational', 'option_key' => 'opening_time', 'option_value' => '09:00:00'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'operational', 'option_key' => 'closing_time', 'option_value' => '22:00:00'],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'operational', 'option_key' => 'auto_accept_orders', 'option_value' => false],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'operational', 'option_key' => 'pre_order_enabled', 'option_value' => false],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'operational', 'option_key' => 'max_order_capacity', 'option_value' => 50],
|
||||
|
||||
// 📊 Analytics / reviews
|
||||
['restaurant_id' => $restaurantId, 'type' => 'analytics', 'option_key' => 'avg_rating', 'option_value' => 0.00],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'analytics', 'option_key' => 'review_count', 'option_value' => 0],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'analytics', 'option_key' => 'total_orders', 'option_value' => 0],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'analytics', 'option_key' => 'last_order_time', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'analytics', 'option_key' => 'last_active_time', 'option_value' => null],
|
||||
|
||||
// 🎯 Marketing & social
|
||||
['restaurant_id' => $restaurantId, 'type' => 'marketing', 'option_key' => 'loyalty_points_enabled', 'option_value' => false],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'marketing', 'option_key' => 'offers_enabled', 'option_value' => false],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'marketing', 'option_key' => 'social_media_links', 'option_value' => json_encode([
|
||||
'facebook' => '',
|
||||
'instagram' => '',
|
||||
'twitter' => '',
|
||||
'linkedin' => '',
|
||||
])],
|
||||
|
||||
// 💻 Future-proof / extra
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system', 'option_key' => 'settings', 'option_value' => json_encode([])],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'system', 'option_key' => 'uuid', 'option_value' => uniqid('rest_')],
|
||||
|
||||
// Email Config
|
||||
['restaurant_id' => $restaurantId, 'type' => 'email_config', 'option_key' => 'email_smtp_host', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'email_config', 'option_key' => 'email_smtp_port', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'email_config', 'option_key' => 'email_smtp_username', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'email_config', 'option_key' => 'email_smtp_password', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'email_config', 'option_key' => 'email_smtp_encryption', 'option_value' => null],
|
||||
|
||||
// SMS Config
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'twilio_api_key', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'twilio_api_secret', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'twilio_sender_id', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'twilio_api_url', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'twilio_is_default', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'nexmo_api_key', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'nexmo_api_secret', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'nexmo_sender_id', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'nexmo_api_url', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'nexmo_is_default', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'muthofun_api_key', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'smsglobal_api_key', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'smsglobal_api_secret', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'smsglobal_sender_id', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'smsglobal_api_url', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'smsglobal_extra_key', 'option_value' => null],
|
||||
['restaurant_id' => $restaurantId, 'type' => 'sms_config', 'option_key' => 'smsglobal_is_default', 'option_value' => null],
|
||||
];
|
||||
|
||||
foreach ($settings as &$item) {
|
||||
$item['setting_type'] = 'Restaurant';
|
||||
$item['created_at'] = now();
|
||||
$item['updated_at'] = now();
|
||||
}
|
||||
|
||||
Setting::insert($settings);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,339 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UtilitySeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
// Default s_a_a_s_settings
|
||||
DB::table('s_a_a_s_settings')->insert([
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'site_name',
|
||||
'value' => 'SAAS Site',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'site_title',
|
||||
'value' => 'SAAS Title',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'phone',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'office_phone',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'email',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'language',
|
||||
'value' => 'en',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'google_map',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'address',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'on_google_map',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'currency_symbol',
|
||||
'value' => '$',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'logo',
|
||||
'value' => 'logo.png',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'disabled_website',
|
||||
'value' => 'no',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'copyright_text',
|
||||
'value' => '© Copyright 2025. All Rights Reserved by FueDevs LTD',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'facebook_link',
|
||||
'value' => 'https://www.facebook.com/',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'google_plus_link',
|
||||
'value' => 'https://www.google.com/',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'youtube_link',
|
||||
'value' => 'https://www.youtube.com/',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'whats_app_link',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'twitter_link',
|
||||
'value' => 'https://www.twitter.com',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'header_notice',
|
||||
'value' => '',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'app_version',
|
||||
'value' => '1.0.0',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'app_url',
|
||||
'value' => 'drive-link',
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'primary_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'secondary_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'primary_container_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'dark_primary_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'dark_secondary_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'dark_container_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'text_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'dark_text_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'sidebar_selected_bg_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'sidebar_selected_text_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'general',
|
||||
'name' => 'sidebar_selected_text_color',
|
||||
'value' => null,
|
||||
],
|
||||
[
|
||||
'type' => 'vercel',
|
||||
'name' => 'vercel_project_id',
|
||||
'value' => 'prj_8PvmJHMdDZNsnjGEK3AarjW75uO4',
|
||||
],
|
||||
[
|
||||
'type' => 'vercel',
|
||||
'name' => 'vercel_token',
|
||||
'value' => '8dBrjwsJuTMq3okIbXCoVo8S',
|
||||
],
|
||||
]);
|
||||
|
||||
// Default s_a_a_s_settings
|
||||
DB::table('s_a_a_s_settings')->insert([
|
||||
// Payment Gateway
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'bkash',
|
||||
'payment_info' => json_encode([
|
||||
'app_key' => '4f6o0cjiki2rfm34kfdadl1eqq',
|
||||
'app_secret' => '2is7hdktrekvrbljjh44ll3d9l1dtjo4pasmjvs5vl5qr3fug4b',
|
||||
'username' => 'sandboxTokenizedUser02',
|
||||
'password' => 'sandboxTokenizedUser02@12345',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'paystack',
|
||||
'payment_info' => json_encode([
|
||||
'public_key' => 'pk_test_cdbf1367be2cde97517468c4752b0333525e88c2',
|
||||
'secret_key' => 'sk_test_78934e683acd8b3fe7ae970f1b2b04ace0464873',
|
||||
'merchant_email' => 'imdshariful171@gmail.com',
|
||||
'callback_url' => 'https:\/\/api.paystack.co',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'razor_pay',
|
||||
'payment_info' => json_encode([
|
||||
'api_key' => 'rzp_test_jXtU63C342FF9B',
|
||||
'api_secret' => 'nrzllzn50ELsRHwFwYthIgBT',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'stripe',
|
||||
'payment_info' => json_encode([
|
||||
'published_key' => 'pk_test_PYPVAZcZj6ismKW2kv2jACU900iAgMGCIb',
|
||||
'api_key' => 'sk_test_bldfFddQARLRVTAJQPLeLWOH00hip4UNZF',
|
||||
'mode' => 'test',
|
||||
'other_config_key' => 'test_value',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'ssl_commerz',
|
||||
'payment_info' => json_encode([
|
||||
'store_id' => 'custo5cc042f7abf4c',
|
||||
'store_password' => 'custo5cc042f7abf4c@ssl',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'pvit',
|
||||
'payment_info' => json_encode([
|
||||
'mc_tel_merchant' => '060234587',
|
||||
'access_token' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.SnhhS251OU1JV1BYenJ6aUMxb1EvZWIyeXVWWFNhK05kZWJiU2lMVUFsN2pwa2Y1K1JpejFZZ25KaUQ1U2hyNUVZcWJ5QzF6L0tmd1lHOVFzK3NqK25WdkpBQm5NZDhqcUlSWjZ2eTFTdnIycE9lOFRDRm82VXY5eldvbkw3cXdwY3F5TW1Dc2JkeTQrbGMwdjB1dWdLNWJKdEJKSjZDZ1Nwb2tNU3dTV1RtTk5oa0hhZnVKVEkyb01CeWFvNDRHVDRXS01EaTMzRFZxSW5wV05YNXcxc2Nad1ZsQVRyRU1HTEYwOHpCVVlObk8waUxmeEI5d2FlbDdhWEZrWVFidTo6YzJ4YVpHKzlEMStoeUpVWG9mcUlWQT09.9yZOaT/zjc2xdW6k37O6qqp+4EzpSKJEwNNK06WXl0c=',
|
||||
'mc_merchant_code' => 'RA5118',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'paypal',
|
||||
'payment_info' => json_encode([
|
||||
'client_id' => 'AabIbRZ97J0GHt0xf_DJj3u1dp6MU9boJGwnRY7OZ6fqBJVsrxd7PaBqqi6OGTYe2e4N4dWkYOkFSNtM',
|
||||
'client_secret' => 'EIeb5GszxCqanj964p4HYBQ5HMx6TwUGedqY6zdfJqlV-TQMF-cgIP2kZP6d_ZgbS3qjiVJxQH1X6wPt',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'paymob_accept',
|
||||
'payment_info' => json_encode([
|
||||
'api_key' => 'ZXlKaGJHY2lPaUpJVXpVeE1pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnVZVzFsSWpvaU1UWTNOelE0TmpZNU1pNDNNemd6TURZaUxDSndjbTltYVd4bFgzQnJJam94Tmpjd01EWXNJbU5zWVhOeklqb2lUV1Z5WTJoaGJuUWlmUS5NRzFqMGp1WXVDLWt3NjAyMlhHcXJWSTB5aWNCNERrVlQzZndWd21HNEtIT3duS0hhVFBJWTdsU3JlaWtvazItYUNyOHlVVDZFdG14SGw4M3Yzd0dHZw==',
|
||||
'integration_id' => '1974622',
|
||||
'iframe_id' => '368299',
|
||||
'hmac_secret' => '3E031CEDBA789C96F50692CA8E7261BA',
|
||||
'supported_country' => 'EG',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'flutterwave',
|
||||
'payment_info' => json_encode([
|
||||
'public_key' => 'LWPUBK_TEST-3f6a0b6c3d621c4ecbb9beeff516c92b-X',
|
||||
'secret_key' => 'FLWSECK_TEST-ec27426eb062491500a9eb95723b5436-X',
|
||||
'encryption_key' => 'FLWSECK_TEST951e36220f66',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'senang_pay',
|
||||
'payment_info' => json_encode([
|
||||
'merchant_id' => 'test_merchant_001',
|
||||
'secret_key' => 'test_secret_key_001',
|
||||
]),
|
||||
],
|
||||
[
|
||||
'type' => 'payment_config',
|
||||
'mode' => 'test',
|
||||
'status' => 1,
|
||||
'name' => 'paytm',
|
||||
'payment_info' => json_encode([
|
||||
'merchant_id' => 'test_mid_001',
|
||||
'merchant_key' => 'test_key_001',
|
||||
'merchant_website_link' => 'WEBSTAGING',
|
||||
'refund_url' => 'https://securegw-stage.paytm.in/refund/apply',
|
||||
]),
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('restaurant_image_s_a_a_s_settings')->insert([
|
||||
[
|
||||
'header_logo_light_theme' => 'demo.png',
|
||||
'header_logo_dark_theme' => 'demo.png',
|
||||
'footer_logo_light_theme' => 'demo.png',
|
||||
'footer_logo_dark_theme' => 'demo.png',
|
||||
'banner_image' => 'demo.png',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
]);
|
||||
|
||||
DB::table('restaurant_image_settings')->insert([
|
||||
[
|
||||
'restaurant_id' => 1,
|
||||
'header_logo_light_theme' => 'demo.png',
|
||||
'header_logo_dark_theme' => 'demo.png',
|
||||
'footer_logo_light_theme' => 'demo.png',
|
||||
'footer_logo_dark_theme' => 'demo.png',
|
||||
'banner_image' => 'demo.png',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user