#pragma once // Spec: models.md GistDetail. #include #include #include "core/Json.hpp" #include "model/Attachment.hpp" #include "model/Comment.hpp" #include "model/Gist.hpp" #include "model/Reactions.hpp" #include "model/User.hpp" #include "model/Vote.hpp" namespace dp { struct GistDetail { Gist::Data gist; User author; bool isOwner = false; std::int64_t starCount = 0; Vote myVote; std::vector comments; std::vector attachments; bool bookmarked = false; Reactions reactions; static GistDetail fromJson(const Json& j); std::string id() const { return "gist:" + gist.id; } }; } // namespace dp