1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use chrono::prelude::*;
use super::account::Account;
use super::status::Status;
#[derive(Debug, Clone, Deserialize)]
pub struct Notification {
pub id: String,
#[serde(rename = "type")]
pub notification_type: NotificationType,
pub created_at: DateTime<Utc>,
pub account: Account,
pub status: Option<Status>,
}
#[derive(Debug, Clone, Deserialize)]
pub enum NotificationType {
#[serde(rename = "mention")]
Mention,
#[serde(rename = "reblog")]
Reblog,
#[serde(rename = "favourite")]
Favourite,
#[serde(rename = "follow")]
Follow,
}