Skip to content

[Feature] Create QuestComment class model for quest comments (1:1 to quest) #25

@karastoyanov

Description

@karastoyanov

✨ Feature Description

Design and implement a new SQLAlchemy model, QuestComment, for managing comments related to individual coding quests. This model should enforce a 1-to-1 relationship with the coding_quests table and track the author, comment text, and creation time.

🧩 Problem Statement

Currently, there is no comment-tracking feature connected to quests. Adding the QuestComment model enables feedback, notes, or additional info for each coding quest.

💡 Proposed Solution

  • Create a new QuestComment model/class.
  • Include a 1:1 relationship with the existing coding_quests model (using quest_id as foreign key, ensuring each quest has at most one comment record).
  • Fields:
    • id: Primary key, UUID or integer
    • quest_id: Foreign key to coding_quests, enforce uniqueness
    • comment_author: UserId of the author's comment (string, required): Relation with users table 1-to-1
    • comment: Text of the comment (required)
    • created_at: Date/time of creation (default current timestamp)

📋 Acceptance Criteria

  • QuestComment model exists with all specified fields
  • Enforces 1:1 relationship with coding_quests
  • Enforces 1:1 relationship with users

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality or behavior

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions