migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Modules\Authentication\Models\Restaurant;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('otp_verifications', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Restaurant::class)->constrained('restaurants')->cascadeOnDelete();
$table->string('phone');
$table->string('otp')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('otp_verifications');
}
};

View File

@@ -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('reviews', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('restaurant_id')->nullable();
$table->foreignId('customer_id')->constrained()->cascadeOnDelete();
$table->foreignId('food_item_id')->constrained()->cascadeOnDelete();
$table->tinyInteger('rating')->unsigned()->default(5);
$table->text('comment')->nullable();
// moderation & visibility
$table->boolean('is_approved')->default(false);
$table->boolean('is_active')->default(true);
// future analytics
$table->unsignedInteger('likes_count')->default(0);
$table->unsignedInteger('reported_count')->default(0);
$table->smallInteger('status')->default(1)->comment('1=Active, 2=InActive');
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('reviews');
}
};

View File

@@ -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
{
public function up(): void
{
Schema::create('review_images', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('restaurant_id')->nullable();
$table->foreignId('review_id')->constrained('reviews')->cascadeOnDelete();
$table->string('image_path');
$table->tinyInteger('position')->default(1);
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('review_images');
}
};