Service
domain.expense.ports.service
Summary
CRUD service wiring for the expense aggregate via the hexa container.
Classes
ExpenseCrudsService
Bases: CrudsServiceAdaptor[Expense, ExpenseDocument]
Expense CRUD service resolving :class:Expense documents from a repo.
Notes
Instances are created by :func:get_expense_service. The model
and schema class attributes bind the domain model and its document
type.
Functions
get_expense_service
Build an expense CRUD service wired to repo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
repo |
Any
|
Mongo-backed expense repository from :func: |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ExpenseCrudsService |
ExpenseCrudsService
|
Ready-to-use expense CRUD service. |