AppFlowy/frontend/rust-lib/flowy-document/src/reminder.rs
Nathan.fooo 58fb529eaa
chore: fix user awareness fetch (#5048)
* chore: fix user awareness fetch

* chore: update

* chore: update
2024-04-03 15:43:19 +08:00

25 lines
632 B
Rust

use collab_entity::reminder::Reminder;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum DocumentReminderAction {
Add { reminder: DocumentReminder },
Remove { reminder_id: String },
Update { reminder: DocumentReminder },
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DocumentReminder {
document_id: String, // defines the necessary fields for a reminder
}
impl TryFrom<Reminder> for DocumentReminder {
type Error = serde_json::Error;
fn try_from(value: Reminder) -> Result<Self, Self::Error> {
Ok(Self {
document_id: value.object_id,
})
}
}