Skip to content

Implement Flag Feedback and Recommendation Feedback Models #4477

@ozer550

Description

@ozer550

Overview

The goal of this issue is to implement a set of Django models that will serve as the foundation for handling feedback and recommendations within the Studio. These models are designed to capture user feedback on various content and interaction events. The models to be implemented include BaseFeedback, BaseFeedbackEvent, BaseFeedbackInteractionEvent, FlagFeedbackEvent, RecommendationsInteractionEvent, and RecommendationsEvent.

Description and outcomes

Base Models Implementation:

  • BaseFeedback Model: implement an abstract base model named BaseFeedback with fields for id, context, created_at, contentnode_id, and content_id.
  • BaseFeedbackEvent Model: implement an abstract base model named BaseFeedbackEvent including a user ForeignKey linking to settings.AUTH_USER_MODEL and target_channel_id.
  • BaseFeedbackInteractionEvent Model: implement an abstract base model named BaseFeedbackInteractionEvent with fields for feedback_type and feedback_reason.

Concrete Models Implementation:

  • FlagFeedbackEvent Model: implement a model named FlagFeedbackEvent inheriting from BaseFeedback, BaseFeedbackEvent, and BaseFeedbackInteractionEvent.
  • RecommendationsInteractionEvent Model: implement a model named RecommendationsInteractionEvent inheriting from BaseFeedback and BaseFeedbackInteractionEvent, including a field for recommendation_event_id.
  • RecommendationsEvent Model: implement a model named RecommendationsEvent inheriting from BaseFeedback and BaseFeedbackEvent, including a field for target_topic_id.
  • Ensure Proper Migration Files: generate migration files for the new models ensuring they accurately represent the models' structure and relationships.
  • Unit Tests: write comprehensive unit tests verifying the integrity of the models, their relationships, and any custom logic. This includes testing model inheritance and field validation.

Acceptance criteria

  • The models must be correctly defined with all specified fields and inheritances, adhering to the project's coding standards.
  • Migration files should be created and successfully applied to the database without errors.
  • All unit tests must pass, ensuring the models' reliability and the correctness of their implementation.
  • The implementation should allow easy extension of the models if additional feedback mechanisms are introduced in the future

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions