' 聊天项目类图
@startuml
' 智能陪聊
' 存储用户的基本信息
class User {
+objectId: String
+createdAt: Date
+username: String
+password: String
+email: String
+profilePicture: String
+bio: String
}
' 存储专业陪聊师的信息
class Chatbot {
+objectId: String
+createdAt: Date
+name: String
+specialization: String
+rating: Float
+availability: Boolean
+profilePicture: String
+bio: String
}
' 记录用户与陪聊师的聊天记录
class ChatRecord {
+objectId: String
+createdAt: Date
+message: String
+timestamp: Date
+user: Pointer
+chatbot: Pointer
}
User "1" --> "*" ChatRecord
Chatbot "1" --> "*" ChatRecord
' 普通聊天
' 存储普通陪聊师的信息
class RegularChatbot {
+objectId: String
+createdAt: Date
+name: String
+description: String
+version: String
+availability: Boolean
+profilePicture: String
}
RegularChatbot "1" --> "*" ChatRecord
@enduml