feat: Implement read cursor activity tracking and recent activity dashboard with context
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -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',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user