Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.1 KB
Raw Blame
use chrono::Utc;
use model_owner::Owner;
use serde::{Deserialize, Serialize};
use uuid::Uuid;

/// A project as displayed in Soup.
#[derive(Serialize, Clone, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]
pub struct SoupProject<T = ()> {
    /// The id of the project
    pub id: Uuid,

    /// The name of the project
    pub name: String,

    /// The owner of the project
    #[cfg_attr(feature = "schema", schema(value_type = String))]
    pub owner_id: Owner,

    /// The parent project id
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parent_id: Option<Uuid>,

    /// The time the project was created
    pub created_at: chrono::DateTime<Utc>,

    /// The time the project was updated
    pub updated_at: chrono::DateTime<Utc>,

    /// The time the document was last viewed
    pub viewed_at: Option<chrono::DateTime<Utc>>,

    /// The time the project was deleted
    pub deleted_at: Option<chrono::DateTime<Utc>>,

    /// Extra fields passed from above
    #[serde(flatten)]
    pub extra: T,
}