mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-08-31 08:12:31 +00:00
23 lines
500 B
Rust
23 lines
500 B
Rust
use serde::{ Deserialize, Serialize };
|
|
use bson::{ UtcDateTime };
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct PreviousEntry {
|
|
pub content: String,
|
|
pub time: UtcDateTime,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct Message {
|
|
#[serde(rename = "_id")]
|
|
pub id: String,
|
|
// pub nonce: String, used internally
|
|
pub channel: String,
|
|
pub author: String,
|
|
|
|
pub content: String,
|
|
pub edited: Option<UtcDateTime>,
|
|
|
|
pub previous_content: Option<Vec<PreviousEntry>>
|
|
}
|