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