Skip to main content

pickcat_api_collection/
dto.rs

1//! 按 API 章节拆分的请求/响应 DTO。
2//!
3//! 共享类型(`CursorListDTO`、`PageInfoDTO`、`TopicAuthorDTO`、
4//! `LevelFamiliarityDTO` 等)放在 [`user`] 模块,供其他 DTO 模块复用。
5
6use serde::{Deserialize, Serialize};
7
8pub mod auth;
9pub mod media;
10pub mod notification;
11pub mod reading_session;
12pub mod tag;
13pub mod topic;
14pub mod user;
15
16#[derive(Debug, Deserialize, Serialize)]
17pub struct LoginDTO {
18    pub username: String,
19    pub password: String,
20}
21
22#[derive(Debug, Clone, Serialize, Deserialize)]
23#[serde(untagged)]
24pub enum IdValue {
25    Num(u64),
26    Str(String),
27}