Skip to main content

yggdrasil/models/
archive.rs

1//! 归档只传输时间线展示字段,不携带摘要、封面或正文。
2use chrono::{DateTime, Utc};
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6pub struct ArchivePost {
7    pub id: i32,
8    pub title: String,
9    pub slug: String,
10    #[cfg_attr(
11        target_arch = "wasm32",
12        serde(deserialize_with = "crate::models::rfc3339::deserialize")
13    )]
14    pub published_at: DateTime<Utc>,
15    pub reading_time: u32,
16    pub tags: Vec<String>,
17}