Skip to content

Conversation

@pan93412
Copy link
Member

  • feat: add submission model
  • chore: generate ent code
  • refactor: update SubmissionResult definition
  • feat: implement submission API

@pan93412 pan93412 self-assigned this Sep 17, 2025
@linear
Copy link

linear bot commented Sep 17, 2025

@pan93412 pan93412 requested a review from Copilot September 18, 2025 14:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements submission functionality allowing users to save their SQL query submission results. The changes include adding a submission model, implementing a submission service with answer validation, and integrating it with the GraphQL API.

  • Add submission domain models: Introduces SQLExecutionResult and UserSQLExecutionResult for storing query results and comparison status
  • Implement submission service: Creates service to handle answer submission, validation against reference answers, and persistence
  • Integration with GraphQL API: Adds submitAnswer mutation and updates resolver structure to support submission functionality

Reviewed Changes

Copilot reviewed 60 out of 60 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
models/submission.go Defines submission result data structures
internal/submission/submission.go Core submission service with answer validation logic
internal/submission/submission_test.go Comprehensive test suite for submission functionality
internal/testhelper/sqlrunner.go Test helpers for SQL runner container setup
graph/question.resolvers.go GraphQL resolver for submitAnswer mutation
ent/schema/submission.go Database schema definition for submissions
Multiple ent/ files Generated Ent ORM code for submission entity

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pan93412 pan93412 marked this pull request as ready for review September 18, 2025 14:16
@pan93412 pan93412 merged commit 13c5505 into main Sep 18, 2025
1 check passed
@pan93412 pan93412 deleted the pan93412/dbp-38-allow-saving-users-submit-result branch September 18, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants