e88fd571f0
- Create `mentorship_assignments` table with relevant fields and indexes. - Add `peer_review_settings` table for lesson-specific peer review configurations. - Enhance `peer_reviews` and `course_submissions` tables with additional fields for instructor reviews and final scores. - Implement My Notes page to display user annotations with delete functionality. - Create Lesson Annotations component for managing notes with editing and deletion capabilities. - Develop Mentor Panel component to display mentor and mentee information. - Add Course Mentorships page for assigning mentors to students with modal for selection. Co-authored-by: Copilot <copilot@github.com>
20 lines
797 B
SQL
20 lines
797 B
SQL
-- Fase 41-B: Anotaciones Privadas en Lecciones
|
|
CREATE TABLE IF NOT EXISTS lesson_annotations (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
user_id UUID NOT NULL,
|
|
lesson_id UUID NOT NULL,
|
|
organization_id UUID NOT NULL,
|
|
course_id UUID NOT NULL,
|
|
content TEXT NOT NULL,
|
|
-- JSON libre: { "type": "timestamp", "value": 42.5 } | { "type": "scroll", "value": 0.35 }
|
|
position_data JSONB,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_lesson_annotations_user_lesson
|
|
ON lesson_annotations (user_id, lesson_id);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_lesson_annotations_user_org
|
|
ON lesson_annotations (user_id, organization_id);
|