-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Labels
DEV: backendP1 - importantPriority: High impact on UXPriority: High impact on UXpythonPull requests that update Python codePull requests that update Python code
Milestone
Description
Overview
This issue focuses on the implementation of serializer classes that will handle the serialization of feedback-related objects. The serializers are designed hierarchically to leverage inheritance, promoting code reuse and maintaining a logical structure. The four distinct serializers to be implemented are BaseFeedbackSerializer, BaseFeedbackEventSerializer, BaseFeedbackInteractionEventSerializer, and FlagFeedbackEventSerializer.
Depends on #4477
Description and outcomes
- Create a file called feedback.py in contentcuration/contentcuration/viewsets/ directory this will contain all the serializer and viewset classes.
BaseFeedbackSerializer:
- Implement a serializer class named BaseFeedbackSerializer.
- Include fields for id (UUID), context (JSON), created_at (DateTime), contentnode_id (UUID), and content_id (UUID).
BaseFeedbackEventSerializer Class:
- Implement a serializer class named BaseFeedbackEventSerializer.
- Include fields for user and target_channel_id (UUID).
- Inherit from BaseFeedbackSerializer to reuse serialization logic.
BaseFeedbackInteractionEventSerializer Class:
- Implement a serializer class named BaseFeedbackInteractionEventSerializer.
- Include fields for feedback_type (String) and feedback_reason (String).
- Inherit from BaseFeedbackSerializer to maintain a consistent approach to serialization.
Unit tests:
- Write tests to validate working of implemented serializers.
Acceptance criteria
- The serializers should correctly serialize the specified fields.
- Ensure the serialized data matches the expected structure for each feedback object.
- Utilize inheritance to maintain a cohesive approach to serialization across different feedback objects.
Metadata
Metadata
Assignees
Labels
DEV: backendP1 - importantPriority: High impact on UXPriority: High impact on UXpythonPull requests that update Python codePull requests that update Python code