nahpu_export 0.1.0

A utility crate for exporting Nahpu project data into documents (Markdown, Typst, PDF).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};
use nahpu_db::types::nahpu_sqlite::{Narrative, Site, CollEvent, Specimen};

/// Contains the root structure representing all exportable database records.
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ExportData {
    /// Collection of narrative records.
    pub narrative: Option<Vec<Narrative>>,
    /// Collection of site records.
    pub sites: Option<Vec<Site>>,
    /// Collection of collecting event records.
    pub events: Option<Vec<CollEvent>>,
    /// Collection of specimen records.
    pub specimens: Option<Vec<Specimen>>,
}