leetcoderustapi/resources/
notification.rs1use serde::Deserialize;
2
3#[derive(Debug, Deserialize)]
4pub struct NotificationsData {
5 pub data: Notifications,
6}
7
8#[derive(Debug, Deserialize)]
9pub struct Notifications {
10 pub notifications: NotificationConnection,
11}
12
13#[allow(non_snake_case)]
14#[derive(Debug, Deserialize)]
15pub struct NotificationConnection {
16 pub edges: Vec<NotificationEdge>,
17 pub pageInfo: PageInfo,
18 pub __typename: String,
19}
20
21#[derive(Debug, Deserialize)]
22pub struct NotificationEdge {
23 pub node: NotificationNode,
24 pub __typename: String,
25}
26
27#[allow(non_snake_case)]
28#[derive(Debug, Deserialize)]
29pub struct NotificationNode {
30 pub id: String,
31 pub notificationId: i32,
32 pub modifiedDate: i64,
33 pub actioned: bool,
34 pub notificationData: NotificationDataNode,
35 pub __typename: String,
36}
37
38#[derive(Debug, Deserialize)]
39pub struct NotificationDataNode {
40 pub id: String,
41 pub content: String,
42 #[serde(rename = "type")]
43 pub type_: String,
44 pub metadata: String,
45 pub __typename: String,
46}
47
48#[allow(non_snake_case)]
49#[derive(Debug, Deserialize)]
50pub struct PageInfo {
51 pub endCursor: String,
52 pub hasNextPage: bool,
53 pub __typename: String,
54}