pickcat_api_collection/dto/notification.rs
1//! 通知 DTO。
2
3use std::collections::BTreeMap;
4
5use serde::{Deserialize, Serialize};
6
7/// `GET /api/v1/notification-summary` 的未读汇总。
8///
9/// `unread_count_by_type` 用 map 承载,避免写死类型枚举;已知 key:
10/// `REPLY_CREATED` / `MANAGEMENT_ACTION` / `POST_LIKED` / `TOPIC_EVENT` /
11/// `USER_FOLLOWED` / `LEVEL_CERTIFICATION`。
12#[derive(Debug, Clone, Serialize, Deserialize)]
13#[serde(rename_all = "camelCase")]
14pub struct NotificationSummaryDTO {
15 pub unread_count: u64,
16 pub unread_count_by_type: BTreeMap<String, u64>,
17}