dak.c2s/backend/app/schemas/notification.py
CCS Admin df26b51e14 feat: admin API, audit logging, notifications, create_admin script
Add audit_service for compliance logging, admin endpoints (user CRUD,
invitation management, audit log), notification endpoints (list, mark
read), and interactive create_admin script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:48:41 +00:00

28 lines
681 B
Python

"""Pydantic v2 schemas for Notification responses."""
from datetime import datetime
from typing import Optional
from pydantic import BaseModel
class NotificationResponse(BaseModel):
"""Single notification returned to the client."""
id: int
notification_type: str
title: str
message: Optional[str] = None
related_entity_type: Optional[str] = None
related_entity_id: Optional[int] = None
is_read: bool
created_at: datetime
model_config = {"from_attributes": True}
class NotificationList(BaseModel):
"""Wrapper that includes an unread counter alongside the item list."""
items: list[NotificationResponse]
unread_count: int