Add notification settings
This commit is contained in:
@@ -47,6 +47,10 @@ class UserPrivate(UserPublic):
|
||||
telegram_username: str | None = None
|
||||
telegram_first_name: str | None = None
|
||||
telegram_last_name: str | None = None
|
||||
# Notification settings
|
||||
notify_events: bool = True
|
||||
notify_disputes: bool = True
|
||||
notify_moderation: bool = True
|
||||
|
||||
|
||||
class TokenResponse(BaseModel):
|
||||
@@ -83,3 +87,20 @@ class UserProfilePublic(BaseModel):
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class NotificationSettings(BaseModel):
|
||||
"""Notification settings for Telegram bot"""
|
||||
notify_events: bool = True
|
||||
notify_disputes: bool = True
|
||||
notify_moderation: bool = True
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class NotificationSettingsUpdate(BaseModel):
|
||||
"""Update notification settings"""
|
||||
notify_events: bool | None = None
|
||||
notify_disputes: bool | None = None
|
||||
notify_moderation: bool | None = None
|
||||
|
||||
Reference in New Issue
Block a user