mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-05 22:34:21 +00:00
Add dashboard audit log and configuration management
- Implemented dashboard audit logging with InsertAuditLog, GetRecentAuditLogs, GetAuditLogsByIP, and CleanupOldAuditLogs methods. - Created dashboard configuration management with GetDashboardConfig and SetDashboardConfig methods. - Added new tables for dashboard_audit_log and dashboard_config in both MySQL and SQLite migrations. - Updated CMakeLists to include Crow and ASIO for dashboard server functionality. - Enhanced existing database classes to support new dashboard features, including character, play key, and property management. - Added new methods for retrieving and managing play keys, properties, and pet names. - Updated TestSQLDatabase to include stubs for new dashboard-related methods. - Modified shared and dashboard configuration files for new settings.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class IPetNames {
|
||||
public:
|
||||
@@ -11,11 +13,24 @@ public:
|
||||
int32_t approvalStatus{};
|
||||
};
|
||||
|
||||
struct DetailedInfo {
|
||||
LWOOBJID id{};
|
||||
std::string petName;
|
||||
int32_t approvalStatus{};
|
||||
LWOOBJID ownerId{};
|
||||
};
|
||||
|
||||
// Set the pet name moderation status for the given pet id.
|
||||
virtual void SetPetNameModerationStatus(const LWOOBJID& petId, const IPetNames::Info& info) = 0;
|
||||
|
||||
// Get pet info for the given pet id.
|
||||
virtual std::optional<IPetNames::Info> GetPetNameInfo(const LWOOBJID& petId) = 0;
|
||||
|
||||
// Dashboard methods
|
||||
virtual std::vector<DetailedInfo> GetAllPetNames() = 0;
|
||||
virtual std::vector<DetailedInfo> GetPetNamesByStatus(int32_t status) = 0;
|
||||
virtual void SetPetApprovalStatus(const LWOOBJID& petId, int32_t status) = 0;
|
||||
virtual uint32_t GetPendingPetNamesCount() = 0;
|
||||
};
|
||||
|
||||
#endif //!__IPETNAMES__H__
|
||||
|
||||
Reference in New Issue
Block a user