|
@@ -10,6 +10,11 @@ class _User {
|
|
+ age: Number
|
|
+ age: Number
|
|
+ email: String
|
|
+ email: String
|
|
+ avatar: String
|
|
+ avatar: String
|
|
|
|
+ + teacherId: String
|
|
|
|
+ + studentId: String
|
|
|
|
+ + identity: String
|
|
|
|
+ + school: String
|
|
|
|
+ + department: String
|
|
}
|
|
}
|
|
class ChatPartner {
|
|
class ChatPartner {
|
|
+ objectId: String
|
|
+ objectId: String
|
|
@@ -42,40 +47,25 @@ class ChatEvaluate{
|
|
+ rating:Number
|
|
+ rating:Number
|
|
+ user: Pointer<User>
|
|
+ user: Pointer<User>
|
|
}
|
|
}
|
|
-class PsychologicalCommunity {
|
|
|
|
- + communityID: String
|
|
|
|
- + topic: String
|
|
|
|
-}
|
|
|
|
-class PsychologicalActivity {
|
|
|
|
- + activityID: String
|
|
|
|
- + title: String
|
|
|
|
- + description: String
|
|
|
|
- + date: Date
|
|
|
|
- + location: String
|
|
|
|
-}
|
|
|
|
-class PsychologicalSurvey {
|
|
|
|
- + surveyID: String
|
|
|
|
- + content: String
|
|
|
|
- + publisher: SchoolAdmin
|
|
|
|
- + responses: List
|
|
|
|
-}
|
|
|
|
-class SchoolAdmin {
|
|
|
|
- + adminID: String
|
|
|
|
- + name: String
|
|
|
|
- + email: String
|
|
|
|
|
|
+
|
|
|
|
+class Survey {
|
|
|
|
+ + objectId: String
|
|
|
|
+ + link: String
|
|
|
|
+ + title: String
|
|
|
|
+ + audience: String
|
|
}
|
|
}
|
|
-class Bottle {
|
|
|
|
|
|
+
|
|
|
|
+class DriftBottle {
|
|
+ bottleID: String
|
|
+ bottleID: String
|
|
+ content: String
|
|
+ content: String
|
|
- + author: User
|
|
|
|
- + timestamp: Date
|
|
|
|
|
|
+ + username: String
|
|
|
|
+ + throwtime: String
|
|
|
|
+ + catcher: String
|
|
|
|
+ + catchtime: String
|
|
|
|
+ + status: String
|
|
}
|
|
}
|
|
-_User "1" -- "0..*" PsychologicalCommunity
|
|
|
|
-PsychologicalActivity "1" -- "0..*" _User
|
|
|
|
-SchoolAdmin "1" -- "0..*" PsychologicalActivity
|
|
|
|
-SchoolAdmin "1" -- "0..*" PsychologicalSurvey
|
|
|
|
-PsychologicalSurvey "1" -- "0..*" _User
|
|
|
|
-_User "1" -- "0..*" Bottle
|
|
|
|
|
|
+Survey "1" -- "0..*" _User
|
|
|
|
+_User "1" -- "0..*" DriftBottle
|
|
_User "*" --> "*" ChatEvaluate
|
|
_User "*" --> "*" ChatEvaluate
|
|
_User "1" --> "*" ChatRecord
|
|
_User "1" --> "*" ChatRecord
|
|
ChatPartner "1" --> "*" ChatRecord
|
|
ChatPartner "1" --> "*" ChatRecord
|
|
@@ -160,15 +150,20 @@ repeat while (回复消息)
|
|
# 用例图
|
|
# 用例图
|
|
```plantuml
|
|
```plantuml
|
|
@startuml
|
|
@startuml
|
|
-actor 学生用户
|
|
|
|
-actor 学校管理员
|
|
|
|
|
|
+actor 用户
|
|
|
|
+
|
|
|
|
|
|
rectangle "心理社区" {
|
|
rectangle "心理社区" {
|
|
- 学生用户 -- (填写心理普查问卷)
|
|
|
|
- 学生用户 -- (使用心理测试)
|
|
|
|
- 学校管理员 -- (发布心理普查问卷)
|
|
|
|
- 学校管理员 -- (发布心理活动通知)
|
|
|
|
- 学校管理员 -- (设置星标用户)
|
|
|
|
|
|
+ 用户 -- (使用心理普查)
|
|
|
|
+ 用户 -- (使用漂流瓶)
|
|
|
|
+}
|
|
|
|
+rectangle "使用心理普查"{
|
|
|
|
+ 用户 -- (填写问卷)
|
|
|
|
+ 用户 -- (发布问卷)
|
|
|
|
+}
|
|
|
|
+rectangle "使用漂流瓶"{
|
|
|
|
+ 用户 -- (扔漂流瓶)
|
|
|
|
+ 用户 -- (捞漂流瓶)
|
|
}
|
|
}
|
|
|
|
|
|
@enduml
|
|
@enduml
|
|
@@ -178,7 +173,7 @@ rectangle "心理社区" {
|
|
|
|
|
|
```mermaid
|
|
```mermaid
|
|
sequenceDiagram
|
|
sequenceDiagram
|
|
- participant Admin as 学校管理员
|
|
|
|
|
|
+ participant Admin as 老师用户
|
|
participant Student as 学生用户
|
|
participant Student as 学生用户
|
|
participant System as 系统
|
|
participant System as 系统
|
|
|
|
|
|
@@ -186,13 +181,9 @@ sequenceDiagram
|
|
Student->>System: 填写心理普查问卷
|
|
Student->>System: 填写心理普查问卷
|
|
System->>Admin: 收集问卷结果
|
|
System->>Admin: 收集问卷结果
|
|
Admin->>System: 分析问卷结果
|
|
Admin->>System: 分析问卷结果
|
|
- alt 心理健康有问题的学生人数达到阈值
|
|
|
|
- System->>Admin: 发布心理团辅
|
|
|
|
- System->>Student: 升级为心理星标用户
|
|
|
|
- end
|
|
|
|
|
|
+
|
|
Admin->>System: 制定后续心理活动
|
|
Admin->>System: 制定后续心理活动
|
|
- System->>Student: 通知学生参与活动
|
|
|
|
- Student->>System: 使用心理测试
|
|
|
|
|
|
+
|
|
```
|
|
```
|
|
# 活动图
|
|
# 活动图
|
|
|
|
|