feat: Seaca mobile API, enrollment, FCM push and admin UI (0.9.0)
Adds mobile device registration by admin codes, refresh tokens, push channel in notification policy, and Settings section for managing Seaca clients. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from sqlalchemy import Boolean, Integer, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.database import Base
|
||||
|
||||
MOBILE_SETTINGS_ROW_ID = 1
|
||||
|
||||
LOGIN_MODE_PASSWORD = "password"
|
||||
LOGIN_MODE_CODE_ONLY = "code_only"
|
||||
LOGIN_MODES = frozenset({LOGIN_MODE_PASSWORD, LOGIN_MODE_CODE_ONLY})
|
||||
|
||||
|
||||
class MobileSettings(Base):
|
||||
"""Singleton: глобальные настройки мобильного клиента Seaca."""
|
||||
|
||||
__tablename__ = "mobile_settings"
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
devices_allowed: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
max_devices_per_user: Mapped[int] = mapped_column(Integer, default=3)
|
||||
min_app_version: Mapped[str | None] = mapped_column(String(32), nullable=True)
|
||||
Reference in New Issue
Block a user