feat: init
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use crate::models::common::{JsonValue, PollLayout};
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
/// Message poll (similar to Discord Polls).
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, sqlx::FromRow)]
|
||||
pub struct MessagePoll {
|
||||
pub id: Uuid,
|
||||
pub message_id: Uuid,
|
||||
pub channel_id: Uuid,
|
||||
pub question: String,
|
||||
pub description: Option<String>,
|
||||
pub layout: PollLayout,
|
||||
pub allow_multiselect: bool,
|
||||
pub duration_hours: Option<i32>,
|
||||
pub ends_at: Option<DateTime<Utc>>,
|
||||
pub total_votes: i64,
|
||||
pub metadata: Option<JsonValue>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: DateTime<Utc>,
|
||||
}
|
||||
Reference in New Issue
Block a user