Platform v2 step 1.11 (APPS_PLATFORM section 10).
- notifications + notification_reads (revision 0010). Text = i18n key notification.<key> + params,
rendered in the reader's language (en, el added).
- core/notifications.py: notify(key, severity, audience, params, dedupe_key, ttl/expires_at, fold)
never raises; audience all_managers | perm:<key> | user:<id>; a live duplicate only bumps
count/last_at (no unread reset, no event). New ones emit WS platform_notification {id} to the
audience's users (current apps ignore it; phase 2 manager shows it).
- API (core, /api/platform/notifications; /api/notifications is chat's): list with unread count,
POST /{id}/read, POST /read-all.
- Producers: license.limit_reached (device pairing/reassign/over-limit device, per module/limit/day,
owners), license.expiring (14/7/3/1 days, from apply_license, owners), support.access_used (each
use, core.settings.manage), print.failed_final (abandoned retry job, per printer/hour, managers).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
2.2 KiB
Python
37 lines
2.2 KiB
Python
"""Import every model module so Base.metadata knows the whole schema.
|
|
|
|
Used by main.py (app startup), migrations/env.py (Alembic autogenerate) and
|
|
the tests. Agent note: a new model module MUST be added here, or Alembic
|
|
autogenerate will not see it and the drift guard (tests/guards) will not
|
|
catch it either.
|
|
"""
|
|
import models.user # noqa: F401 also registers WaiterZone
|
|
import models.table # noqa: F401
|
|
import models.printer # noqa: F401
|
|
import models.product # noqa: F401
|
|
import models.customers # noqa: F401
|
|
import models.order # noqa: F401 also registers OrderAuditLog, OrderDiscount, PrintJob
|
|
import models.business_day # noqa: F401
|
|
import models.shift # noqa: F401 WaiterShift, ShiftBreak
|
|
import models.settings # noqa: F401
|
|
import models.flag # noqa: F401 TableFlagDef, TableFlagAssignment
|
|
import models.message # noqa: F401 StaffMessage, StaffMessageAck, QuickMessageTemplate
|
|
import models.reservation # noqa: F401
|
|
import models.notes # noqa: F401 SiteNote, SiteTodo
|
|
import models.expenses # noqa: F401 Contact, Expense, ExpensePayment
|
|
import models.tabs # noqa: F401 Tab, TabEntry, TabPayment
|
|
import models.waste # noqa: F401 WasteLog
|
|
import models.schedule # noqa: F401 ScheduledShift
|
|
import models.chat # noqa: F401 Conversation, ConversationParticipant, ChatMessage
|
|
import models.prep_zone # noqa: F401 PrepZone, prep_zone_printers, product_prep_zones
|
|
import models.pricing # noqa: F401 PriceGroup, PriceModifier, Deal, PriceEventLog, WaiterDiscountSettings
|
|
import models.recovery_code # noqa: F401
|
|
import models.sync_event # noqa: F401
|
|
import models.site_module # noqa: F401 SiteModule (module enablement, step 1.3)
|
|
import models.user_permission # noqa: F401 UserPermission (permission keys, step 1.5)
|
|
import models.session # noqa: F401 LoginSession (step 1.6)
|
|
import models.device # noqa: F401 Device, DevicePairRequest (step 1.8)
|
|
import models.access_override # noqa: F401 AccessOverride (manager override, step 1.9)
|
|
import models.support_challenge # noqa: F401 SupportChallenge (support access, step 1.10)
|
|
import models.notification # noqa: F401 Notification, NotificationRead (step 1.11)
|