feat: Implement read cursor activity tracking and recent activity dashboard with context

This commit is contained in:
Daan Meijer
2026-06-15 23:37:44 +02:00
parent e32fbc10e0
commit f12639fb59
13 changed files with 721 additions and 28 deletions
@@ -0,0 +1,32 @@
<?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('read_cursors', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->morphs('cursorable');
$table->timestamp('read_at');
$table->timestamps();
$table->unique(['user_id', 'cursorable_id', 'cursorable_type']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('read_cursors');
}
};
+1 -1
View File
@@ -108,7 +108,7 @@ class DatabaseSeeder extends Seeder
$etiquetteLedger = Ledger::create([
'dynamic_id' => $velvetSanctuary->id,
'name' => 'Protocol & Etiquette',
'rules' => 'Address others by correct titles. -5 per infraction.',
'rules' => 'Address others by correct titles. +5 per infraction.',
'score' => 15,
'alignment' => 'negative',
]);