Repos
C++
489 B24 lines Opens in site
Directory
Raw
Download
#pragma once
// Spec: models.md Poll. `voted` is a string on the wire (not a bool).
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include "core/Json.hpp"
#include "model/PollOption.hpp"
namespace dp {
struct Poll {
std::string id;
std::string question;
std::vector<PollOption> options;
std::int64_t total = 0;
std::optional<std::string> myChoice;
std::optional<std::string> voted;
static Poll fromJson(const Json& j);
};
} // namespace dp