From 6169324ffd06714dab2052a8c647da9e89cbd064 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 13 May 2025 19:19:37 +0930 Subject: [PATCH] feat(core): Serializer for model TicketCommentAction ref: #754 #736 --- .github/ISSUE_TEMPLATE/new_model.md | 2 ++ app/core/serializers/ticket_comment_action.py | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 app/core/serializers/ticket_comment_action.py diff --git a/.github/ISSUE_TEMPLATE/new_model.md b/.github/ISSUE_TEMPLATE/new_model.md index 2b2359b9..a609a054 100644 --- a/.github/ISSUE_TEMPLATE/new_model.md +++ b/.github/ISSUE_TEMPLATE/new_model.md @@ -33,6 +33,8 @@ Describe in detail the following: - [ ] 🛠️ Migrations added +- [ ] ♻️ Serializer Created + - [ ] 🔄 [ViewSet Created](https://nofusscomputing.com/projects/centurion_erp/development/views/) - [ ] 🔗 URL Route Added diff --git a/app/core/serializers/ticket_comment_action.py b/app/core/serializers/ticket_comment_action.py new file mode 100644 index 00000000..cdf2842e --- /dev/null +++ b/app/core/serializers/ticket_comment_action.py @@ -0,0 +1,31 @@ +from drf_spectacular.utils import extend_schema_serializer + +from core.models.ticket_comment_action import TicketCommentAction +from core.serializers.ticket_comment import ( + BaseSerializer, + ModelSerializer as TicketCommentBaseModelSerializer, + ViewSerializer as TicketCommentBaseViewSerializer +) + + + +@extend_schema_serializer(component_name = 'TicketCommentActionModelSerializer') +class ModelSerializer( + TicketCommentBaseModelSerializer, + BaseSerializer, +): + + + class Meta(TicketCommentBaseModelSerializer.Meta): + + model = TicketCommentAction + + + +@extend_schema_serializer(component_name = 'TicketCommentActionViewSerializer') +class ViewSerializer( + TicketCommentBaseViewSerializer, + ModelSerializer, +): + + pass