use crate::ids::{AssetId, AssetVersionId, BlockId, PageId, TaskId};
use crate::time::Timestamp;

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ActorRef {
    pub actor_type: String,
    pub actor_id: String,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SourceKind {
    Web,
    Cli,
    Agent,
    Job,
    Import,
    System,
    Other(String),
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ChangeReason {
    pub code: String,
    pub detail: Option<String>,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum RefLink {
    Page(PageId),
    Block(BlockId),
    Asset(AssetId),
    AssetVersion(AssetVersionId),
    Task(TaskId),
    External(String),
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AuditInfo {
    pub created_at: Timestamp,
    pub updated_at: Timestamp,
    pub created_by: Option<ActorRef>,
    pub updated_by: Option<ActorRef>,
}
