2020-04-03 18:41:53 +02:00
|
|
|
use super::super::emoji::Emoji;
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
#[serde(deny_unknown_fields)]
|
2020-04-24 01:28:26 +02:00
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
2020-05-07 16:56:11 +02:00
|
|
|
pub(crate) struct Poll {
|
|
|
|
pub(crate) id: String,
|
|
|
|
pub(crate) expires_at: String,
|
|
|
|
pub(crate) expired: bool,
|
|
|
|
pub(crate) multiple: bool,
|
|
|
|
pub(crate) votes_count: i64,
|
|
|
|
pub(crate) voters_count: Option<i64>,
|
|
|
|
pub(crate) voted: Option<bool>,
|
|
|
|
pub(crate) own_votes: Option<Vec<i64>>,
|
|
|
|
pub(crate) options: Vec<PollOptions>,
|
|
|
|
pub(crate) emojis: Vec<Emoji>,
|
2020-04-03 18:41:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#[serde(deny_unknown_fields)]
|
2020-04-24 01:28:26 +02:00
|
|
|
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
2020-05-07 16:56:11 +02:00
|
|
|
pub(crate) struct PollOptions {
|
|
|
|
pub(crate) title: String,
|
|
|
|
pub(crate) votes_count: Option<i32>,
|
2020-04-03 18:41:53 +02:00
|
|
|
}
|