feat: /internal/renewal/pending
This commit is contained in:
@@ -15,3 +15,17 @@ class LinkCodeStatus(StrEnum):
|
||||
ACTIVE = "active"
|
||||
USED = "used"
|
||||
EXPIRED = "expired"
|
||||
|
||||
|
||||
class NotificationType(StrEnum):
|
||||
SEVEN_DAYS = "7d"
|
||||
THREE_DAYS = "3d"
|
||||
ONE_DAY = "1d"
|
||||
EXPIRED = "expired"
|
||||
|
||||
|
||||
class NotificationStatus(StrEnum):
|
||||
PENDING = "pending"
|
||||
DISPATCHED = "dispatched"
|
||||
SENT = "sent"
|
||||
FAILED = "failed"
|
||||
|
||||
19
schemas/notifications.py
Normal file
19
schemas/notifications.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from datetime import UTC, datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from schemas.enums import NotificationType
|
||||
|
||||
|
||||
class UserNotificationData(BaseModel):
|
||||
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()
|
||||
Reference in New Issue
Block a user