Skip to content

Commit 4482b72

Browse files
committed
chore(docs): 更新项目结构文档- 合并新旧 Web API 目录结构说明
- 详细列出 handlers 和 utils 模块文件- 更新 Web API 模块描述信息-修正数据库表结构代码块格式 - 统一中英文文档中的 API 版本描述
1 parent 77e75c2 commit 4482b72

4 files changed

Lines changed: 27 additions & 18 deletions

File tree

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The system uses the following 6 core tables to store data:
4444

4545
### Table Structure Details
4646

47-
```
47+
```sql
4848
CREATE TABLE IF NOT EXISTS files (
4949
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
5050
type TEXT NOT NULL, -- File type

docs/README_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ FileClassificationSolutions 是一个基于 Rust 语言开发的创新文件分
4444

4545
### 表结构详情
4646

47-
```
47+
```sql
4848
CREATE TABLE IF NOT EXISTS files (
4949
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
5050
type TEXT NOT NULL, -- 文件类型

docs/project_structure.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,19 @@ FileClassificationSolutions/
1818
│ │ ├── service/ # Business logic layer
1919
│ │ └── utils/ # Utility functions
2020
│ └── Cargo.toml # Core library package configuration
21-
├── file_classification_webapi/ # Web API (Legacy)
22-
│ ├── src/bin/ # Various independent API endpoints
23-
│ └── Cargo.toml # Web API package configuration
24-
├── file_classification_webapi2/ # Web API (New)
21+
├── file_classification_webapi/ # Web API
2522
│ ├── src/
26-
│ │ ├── handlers/ # Request handler functions
27-
│ │ └── utils/ # Web API utility functions
28-
│ └── Cargo.toml # Web API2 package configuration
23+
│ │ ├── handlers/ # API request handler functions
24+
│ │ ├── files.rs # File API handlers
25+
│ │ ├── group_tags.rs # Group-tag association API handlers
26+
│ │ ├── groups.rs # Group API handlers
27+
│ │ ├── mod.rs # Module declarations
28+
│ │ └── tags.rs # Tag API handlers
29+
│ ├── utils/ # Web API utility functions
30+
│ │ ├── database.rs # Database connection pool
31+
│ │ ├── mod.rs # Module declarations
32+
│ │ └── models.rs # API data transfer objects
33+
│ └── Cargo.toml # Web API package configuration
2934
├── migrations/ # Database migration scripts
3035
└── nix/ # Nix package management configuration
3136
```
@@ -115,7 +120,7 @@ file_classification_cli/
115120
- Includes complete CRUD functionality
116121
- Supports combined condition queries (AND, OR, NOT)
117122

118-
### file_classification_webapi (Web API - New Version)
123+
### file_classification_webapi (Web API)
119124

120125
RESTful API service built on the Actix-web framework.
121126

docs/project_structure_cn.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@ FileClassificationSolutions/
1818
│ │ ├── service/ # 业务逻辑层
1919
│ │ └── utils/ # 工具函数
2020
│ └── Cargo.toml # 核心库包配置
21-
├── file_classification_webapi/ # Web API (旧版)
22-
│ ├── src/bin/ # 各个独立的API端点
23-
│ └── Cargo.toml # Web API 包配置
24-
├── file_classification_webapi2/ # Web API (新版)
21+
├── file_classification_webapi/ # Web API
2522
│ ├── src/
26-
│ │ ├── handlers/ # 请求处理函数
27-
│ │ └── utils/ # Web API 工具函数
28-
│ └── Cargo.toml # Web API2 包配置
23+
│ │ ├── handlers/ # API 请求处理函数
24+
│ │ ├── group_tags.rs # 组标签关联 API 处理
25+
│ │ ├── groups.rs # 组 API 处理
26+
│ │ ├── mod.rs # 模块声明
27+
│ │ └── tags.rs # 标签 API 处理
28+
│ ├── utils/ # Web API 工具函数
29+
│ │ ├── database.rs # 数据库连接池
30+
│ │ ├── mod.rs # 模块声明
31+
│ │ └── models.rs # API 数据传输对象
32+
│ └── Cargo.toml # Web API 包配置
2933
├── migrations/ # 数据库迁移脚本
3034
└── nix/ # Nix 包管理配置
3135
```
@@ -115,7 +119,7 @@ file_classification_cli/
115119
- 包含完整的增删改查功能
116120
- 支持组合条件查询(AND、OR、NOT)
117121

118-
### file_classification_webapi (Web API - 新版)
122+
### file_classification_webapi (Web API)
119123

120124
基于 Actix-web 框架构建的 RESTful API 服务。
121125

0 commit comments

Comments
 (0)