mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-13 10:14:22 +00:00
- 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.
439 lines
10 KiB
C++
439 lines
10 KiB
C++
#include "TestSQLDatabase.h"
|
|
|
|
void TestSQLDatabase::Connect() {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::Destroy(std::string source) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::Commit() {
|
|
|
|
}
|
|
|
|
bool TestSQLDatabase::GetAutoCommit() {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::SetAutoCommit(bool value) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::ExecuteCustomQuery(const std::string_view query) {
|
|
|
|
}
|
|
|
|
std::optional<IServers::MasterInfo> TestSQLDatabase::GetMasterInfo() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<std::string> TestSQLDatabase::GetApprovedCharacterNames() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<FriendData> TestSQLDatabase::GetFriendsList(LWOOBJID charID) {
|
|
return {};
|
|
}
|
|
|
|
std::optional<IFriends::BestFriendStatus> TestSQLDatabase::GetBestFriendStatus(const LWOOBJID playerCharacterId, const LWOOBJID friendCharacterId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::SetBestFriendStatus(const LWOOBJID playerAccountId, const LWOOBJID friendAccountId, const uint32_t bestFriendStatus) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::AddFriend(const LWOOBJID playerAccountId, const LWOOBJID friendAccountId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::RemoveFriend(const LWOOBJID playerAccountId, const LWOOBJID friendAccountId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateActivityLog(const LWOOBJID characterId, const eActivityType activityType, const LWOMAPID mapId) {
|
|
|
|
}
|
|
|
|
std::vector<IActivityLog::Entry> TestSQLDatabase::GetRecentActivity(const uint32_t limit) {
|
|
return {};
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetActivityLogCount() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<IActivityLog::Entry> TestSQLDatabase::GetActivityLogPaginated(uint32_t offset, uint32_t limit, const std::string& orderColumn, const std::string& orderDir) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::DeleteUgcModelData(const LWOOBJID& modelId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateUgcModelData(const LWOOBJID& modelId, std::stringstream& lxfml) {
|
|
|
|
}
|
|
|
|
std::vector<IUgc::Model> TestSQLDatabase::GetAllUgcModels() {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::CreateMigrationHistoryTable() {
|
|
|
|
}
|
|
|
|
bool TestSQLDatabase::IsMigrationRun(const std::string_view str) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::InsertMigration(const std::string_view str) {
|
|
|
|
}
|
|
|
|
std::optional<ICharInfo::Info> TestSQLDatabase::GetCharacterInfo(const LWOOBJID charId) {
|
|
return {};
|
|
}
|
|
|
|
std::optional<ICharInfo::Info> TestSQLDatabase::GetCharacterInfo(const std::string_view charId) {
|
|
return {};
|
|
}
|
|
|
|
std::string TestSQLDatabase::GetCharacterXml(const LWOOBJID accountId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateCharacterXml(const LWOOBJID characterId, const std::string_view lxfml) {
|
|
|
|
}
|
|
|
|
std::optional<IAccounts::Info> TestSQLDatabase::GetAccountInfo(const std::string_view username) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewCharacter(const ICharInfo::Info info) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertCharacterXml(const LWOOBJID accountId, const std::string_view lxfml) {
|
|
|
|
}
|
|
|
|
std::vector<LWOOBJID> TestSQLDatabase::GetAccountCharacterIds(LWOOBJID accountId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::DeleteCharacter(const LWOOBJID characterId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::SetCharacterName(const LWOOBJID characterId, const std::string_view name) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::SetPendingCharacterName(const LWOOBJID characterId, const std::string_view name) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateLastLoggedInCharacter(const LWOOBJID characterId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::SetPetNameModerationStatus(const LWOOBJID& petId, const IPetNames::Info& info) {
|
|
|
|
}
|
|
|
|
std::optional<IPetNames::Info> TestSQLDatabase::GetPetNameInfo(const LWOOBJID& petId) {
|
|
return {};
|
|
}
|
|
|
|
std::optional<IProperty::Info> TestSQLDatabase::GetPropertyInfo(const LWOMAPID mapId, const LWOCLONEID cloneId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::UpdatePropertyModerationInfo(const IProperty::Info& info) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdatePropertyDetails(const IProperty::Info& info) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateLastSave(const IProperty::Info& info) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewProperty(const IProperty::Info& info, const uint32_t templateId, const LWOZONEID& zoneId) {
|
|
|
|
}
|
|
|
|
std::vector<IPropertyContents::Model> TestSQLDatabase::GetPropertyModels(const LWOOBJID& propertyId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::RemoveUnreferencedUgcModels() {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewPropertyModel(const LWOOBJID& propertyId, const IPropertyContents::Model& model, const std::string_view name) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateModel(const LWOOBJID& modelID, const NiPoint3& position, const NiQuaternion& rotation, const std::array<std::pair<LWOOBJID, std::string>, 5>& behaviors) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::RemoveModel(const LWOOBJID& modelId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdatePerformanceCost(const LWOZONEID& zoneId, const float performanceCost) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewBugReport(const IBugReports::Info& info) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertCheatDetection(const IPlayerCheatDetections::Info& info) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewMail(const MailInfo& mail) {
|
|
|
|
}
|
|
|
|
// PlayKeys (dashboard)
|
|
std::vector<IPlayKeys::Info> TestSQLDatabase::GetAllPlayKeys() {
|
|
return {};
|
|
}
|
|
|
|
std::optional<IPlayKeys::Info> TestSQLDatabase::GetPlayKeyById(const uint32_t playkeyId) {
|
|
return {};
|
|
}
|
|
|
|
std::optional<IPlayKeys::Info> TestSQLDatabase::GetPlayKeyByString(const std::string_view key_string) {
|
|
return {};
|
|
}
|
|
|
|
bool TestSQLDatabase::ConsumePlayKeyUsage(const uint32_t playkeyId) {
|
|
return false;
|
|
}
|
|
|
|
void TestSQLDatabase::CreatePlayKey(const std::string_view key, uint32_t accountId, const std::string_view notes) {
|
|
}
|
|
|
|
void TestSQLDatabase::UpdatePlayKey(const uint32_t playkeyId, uint32_t accountId, bool active, const std::string_view notes) {
|
|
}
|
|
|
|
void TestSQLDatabase::DeletePlayKey(const uint32_t playkeyId) {
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetPlayKeyCount() {
|
|
return 0;
|
|
}
|
|
|
|
// Bug reports (dashboard)
|
|
std::vector<IBugReports::DetailedInfo> TestSQLDatabase::GetAllBugReports() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<IBugReports::DetailedInfo> TestSQLDatabase::GetUnresolvedBugReports() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<IBugReports::DetailedInfo> TestSQLDatabase::GetResolvedBugReports() {
|
|
return {};
|
|
}
|
|
|
|
std::optional<IBugReports::DetailedInfo> TestSQLDatabase::GetBugReportById(const uint64_t reportId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::ResolveBugReport(const uint64_t reportId, const uint32_t resolverAccountId, const std::string_view resolutionNotes) {
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetBugReportCount() {
|
|
return 0;
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetUnresolvedBugReportCount() {
|
|
return 0;
|
|
}
|
|
|
|
// Property moderation (dashboard)
|
|
std::vector<IProperty::Info> TestSQLDatabase::GetAllProperties() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<IProperty::Info> TestSQLDatabase::GetPropertiesByApprovalStatus(uint32_t status) {
|
|
return {};
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetPropertyCount() {
|
|
return 0;
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetUnapprovedPropertyCount() {
|
|
return 0;
|
|
}
|
|
|
|
// Pet name moderation (dashboard)
|
|
std::vector<IPetNames::DetailedInfo> TestSQLDatabase::GetAllPetNames() {
|
|
return {};
|
|
}
|
|
|
|
std::vector<IPetNames::DetailedInfo> TestSQLDatabase::GetPetNamesByStatus(int32_t status) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::SetPetApprovalStatus(const LWOOBJID& petId, int32_t status) {
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetPendingPetNamesCount() {
|
|
return 0;
|
|
}
|
|
|
|
// Character edits (dashboard)
|
|
void TestSQLDatabase::UpdateCharacterPermissions(const LWOOBJID characterId, const ePermissionMap permissions) {
|
|
}
|
|
|
|
void TestSQLDatabase::SetCharacterNeedsRename(const LWOOBJID characterId, const bool needsRename) {
|
|
}
|
|
|
|
// Account dashboard helpers
|
|
std::optional<IAccounts::DetailedInfo> TestSQLDatabase::GetAccountById(const uint32_t accountId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountEmail(const uint32_t accountId, const std::string_view email) {
|
|
}
|
|
|
|
void TestSQLDatabase::DeleteAccount(const uint32_t accountId) {
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewUgcModel(std::stringstream& sd0Data, const uint64_t blueprintId, const uint32_t accountId, const LWOOBJID characterId) {
|
|
|
|
}
|
|
|
|
std::vector<MailInfo> TestSQLDatabase::GetMailForPlayer(const LWOOBJID characterId, const uint32_t numberOfMail) {
|
|
return {};
|
|
}
|
|
|
|
std::optional<MailInfo> TestSQLDatabase::GetMail(const uint64_t mailId) {
|
|
return {};
|
|
}
|
|
|
|
uint32_t TestSQLDatabase::GetUnreadMailCount(const LWOOBJID characterId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::MarkMailRead(const uint64_t mailId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::DeleteMail(const uint64_t mailId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::ClaimMailItem(const uint64_t mailId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertSlashCommandUsage(const LWOOBJID characterId, const std::string_view command) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountUnmuteTime(const uint32_t accountId, const uint64_t timeToUnmute) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountBan(const uint32_t accountId, const bool banned) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountLock(const uint32_t accountId, const bool locked) {
|
|
|
|
}
|
|
|
|
std::vector<IAccounts::ListInfo> TestSQLDatabase::GetAllAccounts() {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountPassword(const uint32_t accountId, const std::string_view bcryptpassword) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::InsertNewAccount(const std::string_view username, const std::string_view bcryptpassword) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::SetMasterInfo(const IServers::MasterInfo& info) {
|
|
|
|
}
|
|
|
|
std::optional<uint64_t> TestSQLDatabase::GetCurrentPersistentId() {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::InsertDefaultPersistentId() {
|
|
|
|
}
|
|
|
|
std::optional<uint32_t> TestSQLDatabase::GetDonationTotal(const uint32_t activityId) {
|
|
return {};
|
|
}
|
|
|
|
std::optional<bool> TestSQLDatabase::IsPlaykeyActive(const int32_t playkeyId) {
|
|
return {};
|
|
}
|
|
|
|
std::vector<IUgc::Model> TestSQLDatabase::GetUgcModels(const LWOOBJID& propertyId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::AddIgnore(const LWOOBJID playerId, const LWOOBJID ignoredPlayerId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::RemoveIgnore(const LWOOBJID playerId, const LWOOBJID ignoredPlayerId) {
|
|
|
|
}
|
|
|
|
std::vector<IIgnoreList::Info> TestSQLDatabase::GetIgnoreList(const LWOOBJID playerId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::InsertRewardCode(const uint32_t account_id, const uint32_t reward_code) {
|
|
|
|
}
|
|
|
|
std::vector<uint32_t> TestSQLDatabase::GetRewardCodesByAccountID(const uint32_t account_id) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::AddBehavior(const IBehaviors::Info& info) {
|
|
|
|
}
|
|
|
|
std::string TestSQLDatabase::GetBehavior(const LWOOBJID behaviorId) {
|
|
return {};
|
|
}
|
|
|
|
void TestSQLDatabase::RemoveBehavior(const LWOOBJID behaviorId) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountGmLevel(const uint32_t accountId, const eGameMasterLevel gmLevel) {
|
|
|
|
}
|
|
|
|
void TestSQLDatabase::UpdateAccountPlayKey(const uint32_t accountId, const uint32_t playKeyId) {
|
|
|
|
}
|
|
|
|
IObjectIdTracker::Range TestSQLDatabase::GetPersistentIdRange() {
|
|
return {};
|
|
}
|