id(); $table->string('reference')->nullable()->unique(); $table->foreignId('property_id')->constrained()->restrictOnDelete(); $table->foreignId('guest_id')->constrained()->restrictOnDelete(); $table->string('status')->index(); $table->string('source')->default('website'); $table->date('arrival'); $table->date('departure'); $table->unsignedTinyInteger('guests'); $table->json('extras')->nullable(); $table->string('promo_code')->nullable(); $table->json('quote'); $table->unsignedInteger('total'); $table->unsignedInteger('deposit'); $table->date('balance_due_on'); $table->dateTime('hold_expires_at')->nullable(); $table->text('message')->nullable(); $table->text('internal_notes')->nullable(); $table->dateTime('confirmed_at')->nullable(); $table->dateTime('cancelled_at')->nullable(); $table->timestamps(); $table->index(['property_id', 'arrival', 'departure']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('bookings'); } };