Doppelbuchungen nur einmal melden und im Postfach der Verwaltung zeigen
Der Kalenderabgleich alle 5 Minuten hat jede fortbestehende Ueberschneidung erneut gemailt. ReportChannelConflicts legt jede Ueberschneidung einmal im neuen Postfach (InboxMessage, Fingerabdruck je Mandant) ab und mailt nur neue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
876a0a20f3
commit
b9225f5fb8
17 files changed
+593
-15
No files matched your search
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* The admin inbox: things the landlord has to look at. A fingerprint per landlord makes every
|
||||
* finding (e.g. one possible double booking) arrive only once, however often it is detected.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('inbox_messages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('tenant_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('property_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('channel_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->string('kind');
|
||||
$table->string('fingerprint', 100);
|
||||
$table->string('subject');
|
||||
$table->text('body');
|
||||
$table->string('action_url')->nullable();
|
||||
$table->timestamp('read_at')->nullable();
|
||||
$table->timestamps();
|
||||
$table->unique(['tenant_id', 'fingerprint']);
|
||||
$table->index(['tenant_id', 'read_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('inbox_messages');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user