22 lines
1.6 KiB
Go
22 lines
1.6 KiB
Go
package ports
|
|
|
|
import (
|
|
"Rezina-Backend/internal/domain"
|
|
"context"
|
|
)
|
|
|
|
// ExamPrepPracticeStore persists exam_prep.lesson_practices and exam_prep.practice_parents.
|
|
type ExamPrepPracticeStore interface {
|
|
CreateExamPrepPractice(ctx context.Context, in domain.CreateExamPrepPracticeInput, parents []domain.ExamPrepPracticeParent) (domain.ExamPrepPractice, error)
|
|
GetExamPrepLessonPracticeByID(ctx context.Context, id int64) (domain.ExamPrepPractice, error)
|
|
TryGetExamPrepLessonPracticeByQuestionSetID(ctx context.Context, questionSetID int64) (domain.ExamPrepPractice, bool, error)
|
|
ListExamPrepPracticesByParent(ctx context.Context, parent domain.ExamPrepPracticeParent, publishedOnly bool, limit, offset int32) ([]domain.ExamPrepPractice, int64, error)
|
|
ListAllExamPrepPractices(ctx context.Context, publishedOnly, unlinkedOnly bool, limit, offset int32) ([]domain.ExamPrepPractice, int64, error)
|
|
CountExamPrepPracticesByParent(ctx context.Context, kind domain.ExamPrepParentKind, parentID int64) (int64, error)
|
|
CountExamPrepPracticesByParentExcludingPractice(ctx context.Context, kind domain.ExamPrepParentKind, parentID, excludePracticeID int64) (int64, error)
|
|
UpdateExamPrepLessonPractice(ctx context.Context, id int64, input domain.UpdateExamPrepPracticeInput) (domain.ExamPrepPractice, error)
|
|
ReplaceExamPrepPracticeParents(ctx context.Context, practiceID int64, parents []domain.ExamPrepPracticeParent) error
|
|
DeleteExamPrepPracticeParent(ctx context.Context, practiceID int64, parent domain.ExamPrepPracticeParent) (bool, error)
|
|
DeleteExamPrepLessonPractice(ctx context.Context, id int64) error
|
|
}
|