@startuml !define FILE_ICON <<(F,#e8bd14)>> class crowd.frontend.impl.crowd_subscriptionPY.CrowdSubscription{ + ID_REGEX: str {field} + COLLECTION: str = db.crowd().crowd_subscription + FIND_RESULTS_PAGE_LIMIT: int = 100 + create(email, camera_id, email_enabled=True) + find(user, emails, cameras, limit, skip) } class crowd.backend.notificationsPY FILE_ICON{ + send_queue_overflow(zone,\n queue_info,\n queue_size,\n detection_time,\n image_url,\n escalation_level=None\n) } database mongoDB.crowd.crowd_subscription{ } database mongoDB.crowd.telegram_subscriptions{ } json crowd_subscription_entry{ "owner_id": "owner_id", "created_at": "timestamp", "subscriber_id": "user_id", "subscriber_login": "email", "telegram_confirmed": "False", "camera_id": "camera_id", "email_enabled": "email_enabled" } json telegram_sub_entry{ "email": "user@email.com", "chat_id": "telegram_chat_id" } CrowdSubscription::COLLECTION -- crowd_subscription telegram_subscriptions .. telegram_sub_entry crowd_subscription .. crowd_subscription_entry crowd_subscription_entry -[thickness=2]- telegram_sub_entry : "subscriber_login ::: email" note left of notificationsPY Функция отправки уведомлений (в том числе и в телегу) end note note right of telegram_subscriptions Сюда мы сейчас руками добавляем записи-связки с crowd_subscription end note @enduml