feat: add self-contained structure to remaining modules
Add exceptions, models, schemas, services directories to modules: customers: - exceptions.py, models/, schemas/, services/ inventory: - exceptions.py, models/, schemas/, services/ messaging: - exceptions.py, models/, schemas/, services/ monitoring: - exceptions.py, models/, schemas/, services/ orders: - exceptions.py, models/, schemas/, services/ payments: - Updated __init__.py All modules now have the standard self-contained directory structure ready for future migration of business logic. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Messaging module definition.
|
||||
|
||||
Defines the messaging module including its features, menu items,
|
||||
and route configurations.
|
||||
route configurations, and self-contained module settings.
|
||||
"""
|
||||
|
||||
from app.modules.base import ModuleDefinition
|
||||
@@ -17,13 +17,6 @@ def _get_admin_router():
|
||||
return admin_router
|
||||
|
||||
|
||||
def _get_admin_notifications_router():
|
||||
"""Lazy import of admin notifications router to avoid circular imports."""
|
||||
from app.modules.messaging.routes.admin import admin_notifications_router
|
||||
|
||||
return admin_notifications_router
|
||||
|
||||
|
||||
def _get_vendor_router():
|
||||
"""Lazy import of vendor router to avoid circular imports."""
|
||||
from app.modules.messaging.routes.vendor import vendor_router
|
||||
@@ -31,22 +24,18 @@ def _get_vendor_router():
|
||||
return vendor_router
|
||||
|
||||
|
||||
def _get_vendor_notifications_router():
|
||||
"""Lazy import of vendor notifications router to avoid circular imports."""
|
||||
from app.modules.messaging.routes.vendor import vendor_notifications_router
|
||||
|
||||
return vendor_notifications_router
|
||||
|
||||
|
||||
# Messaging module definition
|
||||
messaging_module = ModuleDefinition(
|
||||
code="messaging",
|
||||
name="Messaging & Notifications",
|
||||
description="Internal messages, customer communication, and notifications.",
|
||||
version="1.0.0",
|
||||
features=[
|
||||
"customer_messaging", # Customer communication
|
||||
"internal_messages", # Internal team messages
|
||||
"notification_center", # Notification management
|
||||
"message_attachments", # File attachments
|
||||
"admin_notifications", # System admin notifications
|
||||
],
|
||||
menu_items={
|
||||
FrontendType.ADMIN: [
|
||||
@@ -59,6 +48,14 @@ messaging_module = ModuleDefinition(
|
||||
],
|
||||
},
|
||||
is_core=False,
|
||||
# =========================================================================
|
||||
# Self-Contained Module Configuration
|
||||
# =========================================================================
|
||||
is_self_contained=True,
|
||||
services_path="app.modules.messaging.services",
|
||||
models_path="app.modules.messaging.models",
|
||||
schemas_path="app.modules.messaging.schemas",
|
||||
exceptions_path="app.modules.messaging.exceptions",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user