Add PUT /api/v1/modules/:moduleId/lessons/reorder with lessons.reorder permission, matching the existing modules and exam-prep lesson reorder patterns. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
726 B
Go
17 lines
726 B
Go
package ports
|
|
|
|
import (
|
|
"Yimaru-Backend/internal/domain"
|
|
"context"
|
|
)
|
|
|
|
type LessonStore interface {
|
|
CreateLesson(ctx context.Context, moduleID int64, input domain.CreateLessonInput) (domain.Lesson, error)
|
|
GetLessonByID(ctx context.Context, id int64) (domain.Lesson, error)
|
|
ListLessonsByModuleID(ctx context.Context, moduleID int64, publishedOnly bool, limit, offset int32) ([]domain.Lesson, int64, error)
|
|
ListLessonIDsByModule(ctx context.Context, moduleID int64) ([]int64, error)
|
|
UpdateLesson(ctx context.Context, id int64, input domain.UpdateLessonInput) (domain.Lesson, error)
|
|
DeleteLesson(ctx context.Context, id int64) error
|
|
ReorderLessonsInModule(ctx context.Context, moduleID int64, orderedIDs []int64) error
|
|
}
|