|
ORE Studio 0.0.4
|
Service for managing counterparties. More...
#include <counterparty_service.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| counterparty_service (context ctx) | |
| Constructs a counterparty_service with required repositories. | |
| std::vector< domain::counterparty > | list_counterparties (std::uint32_t offset=0, std::uint32_t limit=100) |
| Lists counterparties with pagination. | |
| std::uint32_t | count_counterparties () |
| Returns total number of active counterparties. | |
| std::optional< domain::counterparty > | find_counterparty (const boost::uuids::uuid &id) |
| Finds a counterparty by its ID. | |
| std::optional< domain::counterparty > | find_counterparty_by_code (const std::string &code) |
| Finds a counterparty by its code. | |
| void | save_counterparty (const domain::counterparty &counterparty) |
| Saves a counterparty (creates or updates). | |
| void | save_counterparties (const std::vector< domain::counterparty > &counterparties) |
| Saves multiple counterparties (creates or updates). | |
| void | remove_counterparty (const boost::uuids::uuid &id) |
| Removes a counterparty. | |
| std::vector< domain::counterparty > | get_counterparty_history (const boost::uuids::uuid &id) |
| Gets the version history for a counterparty. | |
Service for managing counterparties.
This service provides functionality for:
|
explicit |
Constructs a counterparty_service with required repositories.
| ctx | The database context. |
| void save_counterparty | ( | const domain::counterparty & | counterparty | ) |
Saves a counterparty (creates or updates).
| counterparty | The counterparty to save |
| void save_counterparties | ( | const std::vector< domain::counterparty > & | counterparties | ) |
Saves multiple counterparties (creates or updates).
| counterparties | The counterparties to save |
| void remove_counterparty | ( | const boost::uuids::uuid & | id | ) |
Removes a counterparty.
| id | The ID of the counterparty to remove |
| std::vector< domain::counterparty > get_counterparty_history | ( | const boost::uuids::uuid & | id | ) |
Gets the version history for a counterparty.
| id | The counterparty ID |