|
ORE Studio 0.0.4
|
Service for managing business units. More...
#include <business_unit_service.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| business_unit_service (context ctx) | |
| Constructs a business_unit_service with required repositories. | |
| std::vector< domain::business_unit > | list_business_units () |
| Lists all business units. | |
| std::optional< domain::business_unit > | find_business_unit (const boost::uuids::uuid &id) |
| Finds a business unit by its ID. | |
| std::optional< domain::business_unit > | find_business_unit_by_code (const std::string &code) |
| Finds a business unit by its code. | |
| void | save_business_unit (const domain::business_unit &business_unit) |
| Saves a business unit (creates or updates). | |
| void | save_business_units (const std::vector< domain::business_unit > &business_units) |
| Saves multiple business units (creates or updates). | |
| void | remove_business_unit (const boost::uuids::uuid &id) |
| Removes a business unit. | |
| std::vector< domain::business_unit > | get_business_unit_history (const boost::uuids::uuid &id) |
| Gets the version history for a business unit. | |
Service for managing business units.
This service provides functionality for:
|
explicit |
Constructs a business_unit_service with required repositories.
| ctx | The database context. |
| void save_business_unit | ( | const domain::business_unit & | business_unit | ) |
Saves a business unit (creates or updates).
| business_unit | The business unit to save |
| void save_business_units | ( | const std::vector< domain::business_unit > & | business_units | ) |
Saves multiple business units (creates or updates).
| business_units | The business units to save |
| void remove_business_unit | ( | const boost::uuids::uuid & | id | ) |
Removes a business unit.
| id | The ID of the business unit to remove |
| std::vector< domain::business_unit > get_business_unit_history | ( | const boost::uuids::uuid & | id | ) |
Gets the version history for a business unit.
| id | The business unit ID |