Added Poll, PollOption

This commit is contained in:
Mr-Andersen 2019-09-12 16:02:36 +03:00
parent 0a87a8ecd2
commit 383d17ef47

13
src/core/types/poll.rs Normal file
View file

@ -0,0 +1,13 @@
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct Poll {
pub id: String,
pub question: String,
pub options: Vec<PollOption>,
pub is_closed: bool
}
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
pub struct PollOption {
pub text: String,
pub voter_count: i32
}