2026-07-25 21:03:46 +02:00
|
|
|
"""Command pattern package for LeoCRM.
|
|
|
|
|
|
|
|
|
|
Commands encapsulate business operations with:
|
|
|
|
|
- Authorization (permission check)
|
|
|
|
|
- Execution (delegates to services)
|
|
|
|
|
- Audit logging
|
|
|
|
|
- Outbox event enqueuing
|
|
|
|
|
- State machine validation
|
|
|
|
|
|
|
|
|
|
Commands do NOT commit or rollback — the calling layer (FastAPI dependency
|
|
|
|
|
``get_db``) manages the transaction boundary.
|
2026-08-16 01:17:18 +02:00
|
|
|
|
|
|
|
|
Note: Plugin-specific commands (mail, calendar, dms) have been moved to their
|
|
|
|
|
respective plugins. Import them directly from the plugin package.
|
2026-07-25 21:03:46 +02:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from app.commands.base import BaseCommand, CommandResult
|
|
|
|
|
from app.commands.contact_commands import (
|
|
|
|
|
CreateContactCommand,
|
|
|
|
|
DeleteContactCommand,
|
|
|
|
|
MergeContactsCommand,
|
2026-08-16 01:17:18 +02:00
|
|
|
UpdateContactCommand,
|
2026-07-25 21:03:46 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
"BaseCommand",
|
|
|
|
|
"CommandResult",
|
|
|
|
|
"CreateContactCommand",
|
|
|
|
|
"UpdateContactCommand",
|
|
|
|
|
"DeleteContactCommand",
|
|
|
|
|
"MergeContactsCommand",
|
|
|
|
|
]
|