أُنشئ من Tokal/Test
29 أسطر
889 B
PHP
29 أسطر
889 B
PHP
<?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('reservations', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('customer_id')->constrained('users')->cascadeOnDelete();
|
|
$table->foreignId('venue_id')->constrained('venues')->cascadeOnDelete();
|
|
$table->date('reservation_date');
|
|
$table->time('reservation_time');
|
|
$table->unsignedSmallInteger('party_size');
|
|
$table->string('status')->default('pending');
|
|
$table->string('rejection_reason')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('reservations');
|
|
}
|
|
};
|