Gästeverzeichnis und Customer Voice
- Gäste: Markierungen, Aufenthalte & Umsatz, Stammgast-/Einwilligungsfilter, CSV-Export, Anonymisierung (manuell + automatisch nach Aufbewahrungsfrist) - Werbe-Einwilligung per Double-Opt-in aus dem Anfrageformular, signierte Bestätigungs-/Abmeldelinks - Bewertungen: automatische Einladung nach Abreise, Bewertungsformular mit Kategorien und internem Feedback, Freigabe und öffentliche Antwort im Admin - Konzept: Rollen, Inhalte, Customer Voice, Architektur Portal-Sync/Buchungshoheit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bb7eb62782
commit
2892e6aeab
44 files changed
+1505
-23
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\ReviewStatus;
|
||||
use App\Models\Property;
|
||||
use App\Models\Review;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Review>
|
||||
*/
|
||||
class ReviewFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'property_id' => Property::factory(),
|
||||
'status' => ReviewStatus::Pending,
|
||||
'source' => 'website',
|
||||
'rating' => 5,
|
||||
'body' => fake()->paragraph(),
|
||||
'display_name' => fake()->firstName().' '.fake()->randomLetter().'.',
|
||||
'publish_consent' => true,
|
||||
'stayed_on' => fake()->dateTimeBetween('-1 year')->format('Y-m-d'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('guests', function (Blueprint $table) {
|
||||
$table->json('tags')->nullable()->after('notes');
|
||||
$table->dateTime('marketing_consent_at')->nullable()->after('tags');
|
||||
$table->dateTime('anonymized_at')->nullable()->after('marketing_consent_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('guests', function (Blueprint $table) {
|
||||
$table->dropColumn(['tags', 'marketing_consent_at', 'anonymized_at']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('reviews', function (Blueprint $table) {
|
||||
$table->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');
|
||||
}
|
||||
};
|
||||
@@ -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
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
$table->dateTime('review_requested_at')->nullable()->after('cancelled_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
$table->dropColumn('review_requested_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user