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:
Aaron Kimbrell
2026-04-22 11:01:41 -05:00
parent d532a9b063
commit e3467465b4
92 changed files with 9133 additions and 77 deletions

View File

@@ -15,6 +15,27 @@ class IActivityLog {
public:
// Update the activity log for the given account.
virtual void UpdateActivityLog(const LWOOBJID characterId, const eActivityType activityType, const LWOMAPID mapId) = 0;
struct Entry {
LWOOBJID characterId{};
eActivityType activity{};
uint32_t timestamp{};
LWOMAPID mapId{};
};
// Retrieve recent activity entries ordered by time desc.
virtual std::vector<Entry> GetRecentActivity(const uint32_t limit) = 0;
// Get total count of activity log entries
virtual uint32_t GetActivityLogCount() = 0;
// Get paginated activity log entries with ordering
virtual std::vector<Entry> GetActivityLogPaginated(
uint32_t offset,
uint32_t limit,
const std::string& orderColumn = "time",
const std::string& orderDir = "DESC"
) = 0;
};
#endif //!__IACTIVITYLOG__H__