Include created_at

This commit is contained in:
koalasat 2024-07-09 21:50:48 +02:00
parent adbaa60da2
commit 6885a24f59
2 changed files with 5 additions and 2 deletions

View File

@ -494,15 +494,15 @@ class ListNotificationSerializer(serializers.ModelSerializer):
status = serializers.SerializerMethodField(
help_text="The `status` of the order when the notification was trigered",
)
class Meta:
model = Notification
fields = ("title", "description", "order_id", "status")
fields = ("title", "description", "order_id", "status", "created_at")
def get_status(self, notification) -> int:
return notification.order.status
class OrderPublicSerializer(serializers.ModelSerializer):
maker_nick = serializers.CharField(required=False)
maker_hash_id = serializers.CharField(required=False)

View File

@ -1110,6 +1110,9 @@ components:
type: integer
readOnly: true
description: The `status` of the order when the notification was trigered
created_at:
type: string
format: date-time
required:
- order_id
- status