添加后端代码、数据库文档和FRP配置

This commit is contained in:
2026-01-30 08:59:06 +08:00
parent 37a6b409ed
commit c09ce065fe
210 changed files with 8560 additions and 0 deletions

107
database_er_diagram.mmd Normal file
View File

@@ -0,0 +1,107 @@
graph TD
subgraph "用户管理模块"
User((User))
Doctor((Doctor))
end
subgraph "宠物管理模块"
Pet((Pet))
end
subgraph "预约管理模块"
Appointment((Appointment))
end
subgraph "就诊管理模块"
Visit((Visit))
end
subgraph "处方管理模块"
Prescription((Prescription))
PrescriptionItem((PrescriptionItem))
end
subgraph "药品管理模块"
Drug((Drug))
end
subgraph "订单管理模块"
Order((Order))
end
subgraph "库存管理模块"
StockIn((StockIn))
StockOut((StockOut))
end
subgraph "病历管理模块"
MedicalRecord((MedicalRecord))
end
subgraph "消息通知模块"
Message((Message))
Notice((Notice))
end
subgraph "报表管理模块"
Report((Report))
end
subgraph "疫苗管理模块"
VaccineRecord((VaccineRecord))
end
%% 用户关系
User --> Pet : 拥有(ownerId)
User --> Appointment : 创建(customerId)
User --> Visit : 就诊(customerId)
User --> Prescription : 处方(customerId)
User --> Order : 订单(customerId)
User --> Message : 发送/接收(senderId/receiverId)
User --> Notice : 发布(publisherId)
User --> Report : 生成(generatedBy)
User --> StockIn : 入库(operatorId)
User --> StockOut : 出库(operatorId)
%% 医生关系
Doctor --> Appointment : 接诊(doctorId)
Doctor --> Visit : 诊治(doctorId)
Doctor --> Prescription : 开具(doctorId)
Doctor --> MedicalRecord : 记录(doctorId)
Doctor --> VaccineRecord : 注射(doctorId)
%% 宠物关系
Pet --> Appointment : 预约(petId)
Pet --> Visit : 就诊(petId)
Pet --> VaccineRecord : 接种(petId)
%% 预约关系
Appointment --> Visit : 关联(appointmentId)
%% 就诊关系
Visit --> Prescription : 对应(visitId)
Visit --> Order : 产生(visitId)
Visit --> MedicalRecord : 记录(visitId)
%% 处方关系
Prescription --> PrescriptionItem : 包含(prescriptionId)
%% 药品关系
Drug --> PrescriptionItem : 包含(drugId)
Drug --> StockIn : 入库(drugId)
Drug --> StockOut : 出库(drugId)
%% 报表关系
Report --> Appointment : 统计
Report --> Visit : 统计
Report --> Order : 统计
Report --> Prescription : 统计
style User fill:#e1f5fe
style Doctor fill:#e8f5e8
style Pet fill:#fff3e0
style Appointment fill:#f3e5f5
style Visit fill:#e0f2f1
style Prescription fill:#ede7f6
style Drug fill:#e0f7fa
style Order fill:#fff8e1