You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/core/repositories/repositories.go defines interfaces for AssessmentRepository, QuestionRepository, and TestCaseRepository — but there are zero concrete implementations. The remaining 5 entity interfaces are also missing.
Already done
Repository interfaces for Assessment, Question, TestCase (interfaces only, in repositories.go)
Build the Repository Layer
internal/core/repositories/repositories.godefines interfaces for AssessmentRepository, QuestionRepository, and TestCaseRepository — but there are zero concrete implementations. The remaining 5 entity interfaces are also missing.Already done
repositories.go)Remaining work
1. Add missing interfaces to
repositories.goInviteRepository— Create, GetByToken, ListByAssessmentID, UpdateStatusAttemptRepository— Create, GetByID, ListByAssessmentID, UpdateStatus, SetScore, SetCompletedAtAnswerRepository— Upsert, GetByAttemptID, SetScoreSubmissionRepository— Create, GetByID, UpdateStatus, UpdateResultSubmissionResultRepository— CreateBatch, GetBySubmissionID2. Implement all 8 concrete repos
Create one file per repo in
internal/core/repositories/(or apostgres/sub-package). Each struct takes*sql.DBin its constructor.assessment_repo.go— implements AssessmentRepository (Create, List, GetByID)question_repo.go— implements QuestionRepository (Create, GetByID, ListByAssessmentID)test_case_repo.go— implements TestCaseRepository (CreateMany, ListByQuestionID)invite_repo.go— implements InviteRepositoryattempt_repo.go— implements AttemptRepositoryanswer_repo.go— implements AnswerRepository (Upsert via INSERT ON CONFLICT)submission_repo.go— implements SubmissionRepositorysubmission_result_repo.go— implements SubmissionResultRepositoryImplementation notes
db.QueryRow/db.Query/db.Exec, no ORMjson.RawMessageinternal/db/schema.go— match column names thereNote: this requires completion of #17