use crate::{
nns::{
NnsGovernanceRefreshAttemptStatus,
governance::{NnsGovernanceCacheMetadata, NnsGovernanceCacheSummary},
proposals::report::{collection::NnsProposalCollectionState, model::NnsProposalRow},
},
snapshot_cache::SnapshotEnvelope,
};
use serde::{Deserialize as SerdeDeserialize, Serialize};
pub(super) type NnsProposalCache =
SnapshotEnvelope<NnsGovernanceCacheMetadata, NnsProposalCacheRows>;
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct NnsProposalCacheListReport {
pub schema_version: u32,
pub network: String,
pub cache_root: String,
pub cache_count: usize,
pub caches: Vec<NnsGovernanceCacheSummary>,
pub collection: String,
pub refresh_attempt_path: String,
pub latest_attempt: Option<NnsGovernanceRefreshAttemptStatus>,
}
#[derive(Clone, Debug, Eq, PartialEq, SerdeDeserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub(super) struct NnsProposalCacheRows {
pub(super) collection_state: NnsProposalCollectionState,
pub(super) proposals: Vec<NnsProposalRow>,
}