#pragma once #include "Key.hpp" #include "types.hpp" #include "DataView.hpp" #include "Signature.hpp" namespace odhtdb { class Group; struct StagedCreateObject { Key key; Group *primaryAdminGroup; u64 timestamp; // In microseconds StagedCreateObject() : key(), primaryAdminGroup(nullptr), timestamp(0) {} StagedCreateObject(const Key &_key, Group *_primaryAdminGroup, u64 _timestamp) : key(_key), primaryAdminGroup(_primaryAdminGroup), timestamp(_timestamp) { } }; struct StagedAddObject { Key key; std::unique_ptr data; u64 timestamp; // In microseconds Signature::PublicKey creatorPublicKey; StagedAddObject() : key(), data(), timestamp(0), creatorPublicKey(Signature::PublicKey::ZERO) {} StagedAddObject(const Key &_key, std::unique_ptr &&_data, u64 _timestamp, const Signature::PublicKey &_creatorPublicKey) : key(_key), data(std::move(_data)), timestamp(_timestamp), creatorPublicKey(_creatorPublicKey) { } }; }