docs: 将所有设计文档中的ASCII图转换为Mermaid格式

- HLD-系统概要设计.md: 转换业务范围、总体架构、技术架构、部署架构、模块划分、模块交互、API接口分组等图
- LLD-会员模块详细设计.md: 转换模块边界、实体关系图
- LLD-预约模块详细设计.md: 转换模块边界、实体关系图
- LLD-签到模块详细设计.md: 转换模块边界、实体关系图

Mermaid格式优势:
- 更好的可维护性和可读性
- 支持在Markdown编辑器中实时预览
- 更容易进行版本对比和修改
- 支持多种图表类型(mindmap, graph, erDiagram, sequenceDiagram)~
This commit is contained in:
张翔
2026-02-28 16:49:19 +08:00
parent 8a7936ba4e
commit e89f5f1f7f
4 changed files with 665 additions and 560 deletions
+84 -80
View File
@@ -29,32 +29,27 @@
### 1.2 模块边界
```
┌─────────────────────────────────────────────────────────────────────────┐
│ 预约模块边界 │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ 预约模块内部 │ │
│ │ │ │
│ │ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌──────────┐ │ │
│ │ │ 课程管理 │ │ 时段管理 │ │ 预约管理 │ │ 库存管理 │ │ │
│ │ └───────────┘ └───────────┘ └───────────┘ └──────────┘ │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ 外部依赖: │
│ ├── 会员模块: 查询会员权益、扣减权益 │
│ ├── 教练模块: 查询教练信息、排班 │
│ ├── 场地模块: 查询场地信息、可用性 │
│ └── 消息模块: 发送预约通知 │
│ │
│ 被依赖: │
│ ├── 签到模块: 查询预约信息、验证签到资格 │
│ ├── 财务模块: 查询预约消费记录 │
│ └── 数据模块: 预约数据分析 │
│ │
└─────────────────────────────────────────────────────────────────────────┘
```mermaid
graph TB
subgraph Internal[预约模块内部]
B1[课程管理]
B2[时段管理]
B3[预约管理]
B4[库存管理]
end
subgraph ExternalDeps[外部依赖]
D1[会员模块<br/>查询会员权益、扣减权益]
D2[教练模块<br/>查询教练信息、排班]
D3[场地模块<br/>查询场地信息、可用性]
D4[消息模块<br/>发送预约通知]
end
subgraph Deps[被依赖]
U1[签到模块<br/>查询预约信息、验证签到资格]
U2[财务模块<br/>查询预约消费记录]
U3[数据模块<br/>预约数据分析]
end
```
---
@@ -63,60 +58,69 @@
### 2.1 实体关系图
```
┌─────────────────────────────────────────────────────────────────────────┐
│ 预约模块ER图 │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ coach │ │ course │ │ venue │ │
│ │─────────────│ │─────────────│ │─────────────│ │
│ │ id │ │ id │ │ id │ │
│ │ name │ │ tenant_id │ │ tenant_id │ │
│ │ specialty │ │ name │ │ name │ │
│ │ status │ │ type │ │ type │ │
│ └──────┬──────┘ │ category │ │ capacity │ │
│ │ │ duration │ │ status │ │
│ │ │ capacity │ └──────┬──────┘ │
│ │ │ status │ │ │
│ │ └──────┬──────┘ │ │
│ │ │ │ │
│ │ ┌────────────────┼─────────────────────┘ │
│ │ │ │ │
│ │ ▼ ▼ │
│ │ ┌─────────────────────────────┐ │
│ │ │ booking_slot │ │
│ │ │─────────────────────────────│ │
│ │ │ id │ │
│ │ │ tenant_id │ │
│ │ │ resource_type (course/venue)│ │
│ │ │ resource_id │ │
│ │ │ coach_id │◀──────────┐ │
│ │ │ venue_id │ │ │
│ │ │ start_time │ │ │
│ │ │ end_time │ │ │
│ │ │ capacity │ │ │
│ │ │ booked_count │ │ │
│ │ │ status │ │ │
│ │ └─────────────┬───────────────┘ │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ ┌─────────────────────────────┐ │ │
│ │ │ booking_record │ │ │
│ │ │─────────────────────────────│ │ │
│ │ │ id │ │ │
│ │ │ tenant_id │ │ │
│ │ │ member_id │ │ │
│ │ │ slot_id │───────────┘ │
│ │ │ coach_id │ │
│ │ │ status │ │
│ │ │ price │ │
│ │ │ checkin_status │ │
│ │ └─────────────────────────────┘ │
│ │ │
│ └────────────────────────────────────────────────────────────┘
│ │
└─────────────────────────────────────────────────────────────────────────┘
### 2.1 实体关系图
```mermaid
erDiagram
coach ||--o{ booking_slot : coaches
course ||--o{ booking_slot : courses
venue ||--o{ booking_slot : venues
booking_slot ||--o{ booking_record : slots
coach {
bigint id PK
varchar name
varchar specialty
smallint status
}
course {
bigint id PK
bigint tenant_id FK
varchar name
smallint type
varchar category
int duration
int capacity
smallint status
}
venue {
bigint id PK
bigint tenant_id FK
varchar name
smallint type
int capacity
smallint status
}
booking_slot {
bigint id PK
bigint tenant_id FK
smallint resource_type
bigint resource_id FK
bigint coach_id FK
bigint venue_id FK
timestamp start_time
timestamp end_time
int capacity
int booked_count
smallint status
}
booking_record {
bigint id PK
bigint tenant_id FK
bigint member_id FK
bigint slot_id FK
bigint coach_id FK
smallint status
decimal price
smallint price_type
decimal price_value
smallint checkin_status
}
```
### 2.2 数据表设计