mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2025-04-20 08:39:53 +08:00
25 lines
568 B
Rust
25 lines
568 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/*interface MessageFile {
|
|
type: string
|
|
url: string
|
|
size?: number
|
|
name?: string
|
|
fid?: string
|
|
}
|
|
*/
|
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
|
pub struct MessageFile {
|
|
#[serde(rename = "type")]
|
|
pub file_type: String,
|
|
pub url: String,
|
|
pub size: Option<i32>,
|
|
pub name: Option<String>,
|
|
pub fid: Option<String>,
|
|
}
|
|
|
|
impl MessageFile {
|
|
pub fn get_name(&self) -> Option<&String> { self.name.as_ref() }
|
|
pub fn get_fid(&self) -> Option<&String> { self.fid.as_ref() }
|
|
}
|