From 383d17ef477df3d3059042b39375c3a41474b5c9 Mon Sep 17 00:00:00 2001 From: Mr-Andersen Date: Thu, 12 Sep 2019 16:02:36 +0300 Subject: [PATCH] Added Poll, PollOption --- src/core/types/poll.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/core/types/poll.rs diff --git a/src/core/types/poll.rs b/src/core/types/poll.rs new file mode 100644 index 00000000..5ffec2aa --- /dev/null +++ b/src/core/types/poll.rs @@ -0,0 +1,13 @@ +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] +pub struct Poll { + pub id: String, + pub question: String, + pub options: Vec, + pub is_closed: bool +} + +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] +pub struct PollOption { + pub text: String, + pub voter_count: i32 +} \ No newline at end of file