Skip to content

finishing domain model structs #17

@adarshm11

Description

@adarshm11

Finish Domain Model Structs

3 of 8 models exist in internal/core/models/models.go (AssessmentTemplate, Question, TestCase). The remaining 5 need to be added.

Already done

  • AssessmentTemplate — id, title, description, durationMinutes, timestamps
  • Question — id, assessmentTemplateId, type, prompt, options, correctAnswer, score, language
  • TestCase — id, questionId, input, expectedOutput, isHidden, score

Remaining work

Add the following structs to internal/core/models/models.go:

  • AssessmentInvite — id (int64), assessment_template_id (int64), candidate_email (string), invite_token (string), expires_at (time.Time), status (string), created_at, updated_at
  • AssessmentAttempt — id (int64), invite_id (int64), started_at (*time.Time), completed_at (*time.Time), status (string), total_score (*int), created_at, updated_at
  • Answer — id (int64), attempt_id (int64), question_id (int64), response (json.RawMessage), score_awarded (*int), created_at, updated_at
  • Submission — id (int64), attempt_id (int64), question_id (int64), language (string), source_code (string), status (string), stdout (*string), stderr (*string), execution_ms (*int), memory_bytes (*int64), score_awarded (*int), created_at, updated_at
  • SubmissionResult — id (int64), submission_id (int64), test_case_id (int64), passed (bool), actual_output (string), execution_ms (*int), created_at

All structs need json:"..." and db:"..." tags. Use pointer types for nullable fields consistent with existing models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions