feat(tester): add solution endpoints

add CreateSolution&GetSolution&ListSolutions endpoints
This commit is contained in:
Vyacheslav1557 2025-03-27 00:04:52 +05:00
parent af6e0b89f6
commit ef696d2836
9 changed files with 316 additions and 8 deletions

View file

@ -65,3 +65,15 @@ func (uc *ContestUseCase) UpdateContest(ctx context.Context, id int32, contestUp
func (uc *ContestUseCase) UpdateParticipant(ctx context.Context, id int32, participantUpdate models.ParticipantUpdate) error {
return uc.contestRepo.UpdateParticipant(ctx, id, participantUpdate)
}
func (uc *ContestUseCase) ReadSolution(ctx context.Context, id int32) (*models.Solution, error) {
return uc.contestRepo.ReadSolution(ctx, id)
}
func (uc *ContestUseCase) CreateSolution(ctx context.Context, creation *models.SolutionCreation) (int32, error) {
return uc.contestRepo.CreateSolution(ctx, creation)
}
func (uc *ContestUseCase) ListSolutions(ctx context.Context, filters models.SolutionsFilter) ([]*models.SolutionsListItem, int32, error) {
return uc.contestRepo.ListSolutions(ctx, filters)
}