hgame 0.26.4

CG production management structs, e.g. of assets, personnels, progress, etc.
Documentation
use super::*;

#[derive(Debug, Clone)]
#[cfg_attr(feature = "mongo", derive(Serialize, Deserialize))]
/// Collaborative note about outgoing delivery of an asset for a certain day.
pub struct DeliNote {
    #[cfg_attr(
        feature = "mongo",
        serde(rename = "_id", skip_serializing_if = "Option::is_none")
    )]
    pub id: Option<ObjectId>,

    #[allow(dead_code)]
    #[cfg_attr(feature = "mongo", serde(skip))]
    /// For user selection in the UI.
    checked: bool,

    /// The `ObjectId`s refer to the [`ProductionAsset`]s.
    topical_assets: Vec<ObjectId>,

    /// Key is the name of the author of the note.
    notes: HashMap<String, Vec<Contrib>>,

    #[cfg_attr(
        feature = "mongo",
        serde(with = "bson::serde_helpers::chrono_datetime_as_bson_datetime")
    )]
    created_at: DateTime<Utc>,
}

// -------------------------------------------------------------------------------
#[derive(Debug, Clone)]
#[cfg_attr(feature = "mongo", derive(Serialize, Deserialize))]
struct Contrib {
    note: String,

    #[cfg_attr(
        feature = "mongo",
        serde(with = "bson::serde_helpers::chrono_datetime_as_bson_datetime")
    )]
    updated_at: DateTime<Utc>,
}