id(); $table->string('booking_number')->unique(); $table->unsignedBigInteger('client_id'); $table->unsignedBigInteger('employee_id'); $table->unsignedBigInteger('service_id'); $table->date('booking_date'); $table->time('start_time'); $table->time('end_time'); $table->enum('status', ['confirmed', 'cancelled', 'completed'])->default('confirmed'); $table->enum('cancelled_by', ['client', 'admin'])->nullable(); $table->text('cancel_reason')->nullable(); $table->timestamps(); $table->foreign('client_id')->references('id')->on('users'); $table->foreign('employee_id')->references('id')->on('users'); $table->foreign('service_id')->references('id')->on('services'); $table->unique(['employee_id', 'booking_date', 'start_time']); }); } public function down() { Schema::dropIfExists('bookings'); } };