fix(core): Add ability to add notes for ticket comment category

ref: #662 #666
This commit is contained in:
2025-03-04 03:23:04 +09:30
parent 8a787a516f
commit 5b97f5400f
3 changed files with 151 additions and 0 deletions

View File

@ -0,0 +1,42 @@
from core.models.ticket.ticket_comment_category_notes import TicketCommentCategoryNotes
from core.serializers.model_notes import (
ModelNotes,
ModelNoteBaseSerializer,
ModelNoteModelSerializer,
ModelNoteViewSerializer
)
class TicketCommentCategoryNoteBaseSerializer(ModelNoteBaseSerializer):
pass
class TicketCommentCategoryNoteModelSerializer(
ModelNoteModelSerializer
):
class Meta:
model = TicketCommentCategoryNotes
fields = ModelNoteModelSerializer.Meta.fields + [
'model',
]
read_only_fields = ModelNoteModelSerializer.Meta.read_only_fields + [
'model',
'content_type',
]
class TicketCommentCategoryNoteViewSerializer(
ModelNoteViewSerializer,
TicketCommentCategoryNoteModelSerializer,
):
pass