|
ORE Studio 0.0.4
|
Service for managing change reason categories and change reasons. More...
#include <change_management_service.hpp>

Public Types | |
| using | context = ores::database::context |
Public Member Functions | |
| change_management_service (context ctx) | |
| Constructs a change_management_service with required repositories. | |
| std::vector< domain::change_reason_category > | list_categories () |
| Lists all change reason categories. | |
| std::vector< domain::change_reason_category > | list_categories (std::uint32_t offset, std::uint32_t limit) |
| Lists change reason categories with pagination. | |
| std::uint32_t | get_category_count () |
| Gets the total count of active categories. | |
| std::optional< domain::change_reason_category > | find_category (const std::string &code) |
| Finds a category by its code. | |
| void | save_category (const domain::change_reason_category &category) |
| Saves a change reason category (creates or updates). | |
| void | remove_category (const std::string &code) |
| Removes a change reason category. | |
| std::vector< domain::change_reason_category > | get_category_history (const std::string &code) |
| Gets the version history for a category. | |
| std::vector< domain::change_reason > | list_reasons () |
| Lists all change reasons. | |
| std::vector< domain::change_reason > | list_reasons (std::uint32_t offset, std::uint32_t limit) |
| Lists change reasons with pagination. | |
| std::vector< domain::change_reason > | list_reasons_by_category (const std::string &category_code) |
| Lists change reasons for a specific category. | |
| std::uint32_t | get_reason_count () |
| Gets the total count of active reasons. | |
| std::optional< domain::change_reason > | find_reason (const std::string &code) |
| Finds a reason by its code. | |
| void | save_reason (const domain::change_reason &reason) |
| Saves a change reason (creates or updates). | |
| void | remove_reason (const std::string &code) |
| Removes a change reason. | |
| std::vector< domain::change_reason > | get_reason_history (const std::string &code) |
| Gets the version history for a reason. | |
| bool | is_valid_reason_code (const std::string &code) |
| Validates that a change reason code exists. | |
| bool | is_valid_category_code (const std::string &code) |
| Validates that a category code exists. | |
Service for managing change reason categories and change reasons.
This service provides functionality for:
|
explicit |
Constructs a change_management_service with required repositories.
| ctx | The database context. |
| void save_category | ( | const domain::change_reason_category & | category | ) |
Saves a change reason category (creates or updates).
| category | The category to save |
| void remove_category | ( | const std::string & | code | ) |
Removes a change reason category.
| code | The code of the category to remove |
| std::vector< domain::change_reason_category > get_category_history | ( | const std::string & | code | ) |
Gets the version history for a category.
| code | The category code |
| void save_reason | ( | const domain::change_reason & | reason | ) |
Saves a change reason (creates or updates).
| reason | The reason to save |
| void remove_reason | ( | const std::string & | code | ) |
Removes a change reason.
| code | The code of the reason to remove |
| std::vector< domain::change_reason > get_reason_history | ( | const std::string & | code | ) |
Gets the version history for a reason.
| code | The reason code |
| bool is_valid_reason_code | ( | const std::string & | code | ) |
Validates that a change reason code exists.
| code | The change reason code to validate |
| bool is_valid_category_code | ( | const std::string & | code | ) |
Validates that a category code exists.
| code | The category code to validate |