36 lines
800 B
Rust
36 lines
800 B
Rust
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::event::{RoomInfo, UserInfo};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct DraftSavedService {
|
|
pub user: UserInfo,
|
|
pub room: RoomInfo,
|
|
pub content: String,
|
|
pub saved_at: DateTime<Utc>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct DraftClearedService {
|
|
pub user: UserInfo,
|
|
pub room: RoomInfo,
|
|
pub cleared_at: DateTime<Utc>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct DraftSaveClient {
|
|
pub room: RoomInfo,
|
|
pub content: String,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct DraftLoadClient {
|
|
pub room: RoomInfo,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct DraftClearClient {
|
|
pub room: RoomInfo,
|
|
}
|