Add threaded comment replies for admin and curator
- Add parentId field to LessonComment (self-referential FK, SetNull on delete) - Show replies indented under parent comment with left border visual - Add reply button (visible to admin/curator only) with inline textarea - Only root comments shown in main list; replies nested below their parent - Update comment count to include replies - Server-side validation: only admin/curator can reply, parent must belong to same lesson Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE "LessonComment" ADD COLUMN "parentId" TEXT;
|
||||
|
||||
ALTER TABLE "LessonComment" ADD CONSTRAINT "LessonComment_parentId_fkey"
|
||||
FOREIGN KEY ("parentId") REFERENCES "LessonComment"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user