Skip to main content

paperless_api/
note.rs

1use chrono::{DateTime, Utc};
2use serde::Deserialize;
3
4use crate::id::{NoteId, UserId};
5
6#[derive(Debug, Clone, Deserialize)]
7pub struct Note {
8    pub id: NoteId,
9
10    pub created: DateTime<Utc>,
11
12    pub user: NoteUser,
13
14    #[serde(rename = "note")]
15    pub content: String,
16}
17
18#[derive(Debug, Clone, Deserialize)]
19pub struct NoteUser {
20    pub id: UserId,
21    pub username: String,
22
23    pub first_name: String,
24    pub last_name: String,
25}