id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('type'); // platform | reclamation | schedule $table->string('event'); // created | status_changed | schedule_added $table->string('title'); $table->text('message'); $table->text('message_html')->nullable(); $table->json('data')->nullable(); $table->timestamp('read_at')->nullable(); $table->timestamps(); $table->index(['user_id', 'read_at']); $table->index(['type', 'event']); }); } public function down(): void { Schema::dropIfExists('user_notifications'); } };