wp_mini/field/part_reference_field.rs
1use crate::field::DefaultableFields;
2use strum_macros::{Display, EnumIter};
3
4/// Represents the fields for a `PartReference` object.
5///
6/// A `PartReference` is typically a lightweight link to a story part,
7/// often found within a list of parts in a story object.
8#[derive(Debug, Clone, Copy, Display, EnumIter, PartialEq, Eq, Ord, PartialOrd, Hash)]
9#[strum(serialize_all = "camelCase")]
10pub enum PartReferenceField {
11 /// The unique numerical identifier of the story part.
12 Id,
13 /// The timestamp when the part was created.
14 CreateDate,
15}
16
17impl DefaultableFields for PartReferenceField {
18 fn default_fields() -> Vec<Self> {
19 vec![Self::Id]
20 }
21}