|
ORE Studio 0.0.4
|
Service for managing parties. More...
#include <party_service.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| party_service (context ctx) | |
| Constructs a party_service with required repositories. | |
| std::vector< domain::party > | list_parties () |
| Lists all parties. | |
| std::vector< domain::party > | list_parties (std::uint32_t offset, std::uint32_t limit) |
| Lists parties with pagination support. | |
| std::uint32_t | count_parties () |
| Gets the total count of active parties. | |
| std::optional< domain::party > | find_party (const boost::uuids::uuid &id) |
| Finds a party by its ID. | |
| std::optional< domain::party > | find_party_by_code (const std::string &code) |
| Finds a party by its code. | |
| void | save_party (const domain::party &party) |
| Saves a party (creates or updates). | |
| void | save_parties (const std::vector< domain::party > &parties) |
| Saves multiple parties (creates or updates). | |
| void | remove_party (const boost::uuids::uuid &id) |
| Removes a party. | |
| std::vector< domain::party > | get_party_history (const boost::uuids::uuid &id) |
| Gets the version history for a party. | |
Service for managing parties.
This service provides functionality for:
|
explicit |
Constructs a party_service with required repositories.
| ctx | The database context. |
| std::vector< domain::party > list_parties | ( | std::uint32_t | offset, |
| std::uint32_t | limit | ||
| ) |
Lists parties with pagination support.
| offset | Number of records to skip. |
| limit | Maximum number of records to return. |
| std::uint32_t count_parties | ( | ) |
Gets the total count of active parties.
| void save_party | ( | const domain::party & | party | ) |
Saves a party (creates or updates).
| party | The party to save |
| void save_parties | ( | const std::vector< domain::party > & | parties | ) |
Saves multiple parties (creates or updates).
| parties | The parties to save |
| void remove_party | ( | const boost::uuids::uuid & | id | ) |
Removes a party.
| id | The ID of the party to remove |
| std::vector< domain::party > get_party_history | ( | const boost::uuids::uuid & | id | ) |
Gets the version history for a party.
| id | The party ID |