#pragma once #include "core/data/infractions.hpp" #include "json_util.hpp" #include namespace nlohmann { template struct adl_serializer> { static void to_json(json& j, const std::optional& opt) { if (opt == std::nullopt) { j = nullptr; } else { j = *opt; } } static void from_json(const json& j, std::optional& opt) { if (j.is_null()) { opt = std::nullopt; } else { opt = j.get(); } } }; } enum class GSType : int32_t; namespace big { struct persistent_player { std::string name; std::uint64_t rockstar_id = 0; bool block_join = false; int block_join_reason = 1; bool is_modder = false; bool notify_online = false; std::unordered_set infractions; std::string notes = ""; std::optional command_access_level = std::nullopt; GSType session_type = GSType(-2); int64_t session_id = -1; NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(persistent_player, name, rockstar_id, block_join, block_join_reason, is_modder, notify_online, infractions, notes, command_access_level) }; };