Make some fields Option enum

This commit is contained in:
Flori Weber 2023-06-11 17:49:30 +02:00
parent 99aa44daa8
commit 5a0bf4b570
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ pub struct Attachment {
pub waveform: Option<String>, pub waveform: Option<String>,
#[serde(skip_serializing)] #[serde(skip_serializing)]
#[cfg_attr(feature = "sqlx", sqlx(default))] #[cfg_attr(feature = "sqlx", sqlx(default))]
pub content: Vec<u8>, pub content: Option<Vec<u8>>,
} }
#[derive(Debug, Serialize, Deserialize, Clone)] #[derive(Debug, Serialize, Deserialize, Clone)]

View File

@ -15,10 +15,10 @@ pub struct Message {
pub channel_id: Snowflake, pub channel_id: Snowflake,
#[cfg_attr(feature = "sqlx", sqlx(skip))] #[cfg_attr(feature = "sqlx", sqlx(skip))]
pub author: PublicUser, pub author: PublicUser,
pub content: String, pub content: Option<String>,
pub timestamp: String, pub timestamp: String,
pub edited_timestamp: Option<String>, pub edited_timestamp: Option<String>,
pub tts: bool, pub tts: Option<bool>,
pub mention_everyone: bool, pub mention_everyone: bool,
#[cfg_attr(feature = "sqlx", sqlx(skip))] #[cfg_attr(feature = "sqlx", sqlx(skip))]
pub mentions: Option<Vec<User>>, pub mentions: Option<Vec<User>>,