cream_core/meta.rs
1use serde::Serialize;
2
3use crate::{date_time::DateTime, reference::Reference};
4
5/// Metadata about a resource.
6#[derive(Serialize, Debug, Clone, Default)]
7#[serde(rename_all = "camelCase")]
8pub struct Meta<R: Serialize> {
9 /// The type of resource.
10 pub resource_type: R,
11 /// When the resource was created.
12 pub created: Option<DateTime>,
13 /// When the resource was last modified.
14 pub last_modified: Option<DateTime>,
15 /// The URL of the resource.
16 pub location: Option<Reference>,
17 /// The current version of the resource.
18 pub version: Option<String>,
19}