用户服务 4 个 crate 合并为单一 user-service,按 DDD 限界上下文聚合
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
18
backend/services/user-service/src/api.rs
Normal file
18
backend/services/user-service/src/api.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
// 注册/业务类接口的统一请求/响应包装格式
|
||||
// 与 backend/CLAUDE.md 中的 API 公共约定保持一致
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ApiRequest<T> {
|
||||
pub device: i32,
|
||||
pub language: i32,
|
||||
pub data: T,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ApiResponse<T> {
|
||||
pub success: bool,
|
||||
pub message: String,
|
||||
pub data: Option<T>,
|
||||
}
|
||||
Reference in New Issue
Block a user