id(); $table->foreignId('property_id')->constrained()->cascadeOnDelete(); $table->foreignId('booking_id')->nullable()->unique()->constrained()->nullOnDelete(); $table->string('status')->index(); $table->string('source')->default('website'); $table->unsignedTinyInteger('rating'); $table->unsignedTinyInteger('rating_cleanliness')->nullable(); $table->unsignedTinyInteger('rating_equipment')->nullable(); $table->unsignedTinyInteger('rating_location')->nullable(); $table->unsignedTinyInteger('rating_host')->nullable(); $table->string('title')->nullable(); $table->text('body')->nullable(); $table->text('private_feedback')->nullable(); $table->string('display_name'); $table->boolean('publish_consent')->default(false); $table->date('stayed_on')->nullable(); $table->text('response')->nullable(); $table->dateTime('responded_at')->nullable(); $table->dateTime('approved_at')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('reviews'); } };