Files
malenia-backend/schemas/notifications.py
2026-08-24 10:22:14 +07:00

25 lines
626 B
Python

from datetime import UTC, datetime
from pydantic import BaseModel, Field
from schemas.enums import NotificationType
class UserNotificationData(BaseModel):
notification_id: int = Field()
username: str = Field()
telegram_id: int | None = Field()
expires_at: datetime = Field()
notification_type: NotificationType = Field()
class NotificationResponse(BaseModel):
created_at: datetime = Field(default_factory=lambda: datetime.now(UTC))
issued_by: str = Field()
users: list[UserNotificationData] = Field()
class NotificationAcknowledgeRequest(BaseModel):
notification_id: int = Field()