|
@@ -194,15 +194,76 @@ stop
|
|
|
|
|
|
```plantuml
|
|
|
@startuml
|
|
|
-start
|
|
|
-:打开应用程序;
|
|
|
-:选择“注册”选项;
|
|
|
-:输入个人信息(用户名、密码);
|
|
|
-:二次输入密码;
|
|
|
-:提交注册信息;
|
|
|
|
|
|
-:返回登录页面;
|
|
|
-stop
|
|
|
+@startuml
|
|
|
+
|
|
|
+' Define CloudObject as a base class
|
|
|
+class CloudObject {
|
|
|
+ +String id
|
|
|
+ +Date createdAt
|
|
|
+ +Date updatedAt
|
|
|
+ +set(data: Record<String, Any>)
|
|
|
+ +save(): Promise<CloudObject>
|
|
|
+ +destroy(): Promise<Boolean>
|
|
|
+}
|
|
|
+
|
|
|
+' Define CloudUser class (user entity)
|
|
|
+class CloudUser {
|
|
|
+ +String objectId
|
|
|
+ +String username
|
|
|
+ +String sessionToken
|
|
|
+ +current(): Promise<CloudUser>
|
|
|
+ +login(username: String, password: String): Promise<CloudUser>
|
|
|
+ +logout(): Promise<Boolean>
|
|
|
+ +signUp(username: String, password: String, additionalData: Record<String, Any>): Promise<CloudUser>
|
|
|
+}
|
|
|
+
|
|
|
+' Define CloudSeUser class (user data entity)
|
|
|
+class CloudSeUser {
|
|
|
+ +String objectId
|
|
|
+ +String userName
|
|
|
+ +String email
|
|
|
+ +String gender
|
|
|
+ +CloudUser user
|
|
|
+ +saveUserInfo(userData: Record<String, Any>): Promise<CloudObject>
|
|
|
+ +updateUserInfo(updatedData: Record<String, Any>): Promise<CloudObject>
|
|
|
+ +deleteUserInfo(): Promise<Boolean>
|
|
|
+}
|
|
|
+
|
|
|
+' Define CloudSeMealPlan class (meal plan entity)
|
|
|
+class CloudSeMealPlan {
|
|
|
+ +String objectId
|
|
|
+ +Integer No
|
|
|
+ +String mealType
|
|
|
+ +String mealDescription
|
|
|
+ +CloudUser user
|
|
|
+ +saveMealPlan(mealPlanData: Record<String, Any>): Promise<CloudObject>
|
|
|
+ +updateMealPlan(updatedData: Record<String, Any>, mealPlanId: String): Promise<CloudObject>
|
|
|
+ +deleteMealPlan(mealPlanId: String): Promise<Boolean>
|
|
|
+}
|
|
|
+
|
|
|
+' Define CloudShipu class (recipe entity)
|
|
|
+class CloudShipu {
|
|
|
+ +String objectId
|
|
|
+ +String title
|
|
|
+ +String ingredients
|
|
|
+ +String instructions
|
|
|
+ +CloudUser user
|
|
|
+ +saveShipuInfo(shipuData: Record<String, Any>): Promise<CloudObject>
|
|
|
+ +updateShipuInfo(id: String, updatedData: Record<String, Any>): Promise<CloudObject>
|
|
|
+ +deleteShipuInfo(id: String): Promise<Boolean>
|
|
|
+}
|
|
|
+
|
|
|
+' Relationships
|
|
|
+CloudUser "1" -- "0..*" CloudSeUser : manages
|
|
|
+CloudUser "1" -- "0..*" CloudSeMealPlan : manages
|
|
|
+CloudUser "1" -- "0..*" CloudShipu : manages
|
|
|
+
|
|
|
+CloudSeUser "1" -- "1" CloudUser : refers to
|
|
|
+CloudSeMealPlan "1" -- "1" CloudUser : refers to
|
|
|
+CloudShipu "1" -- "1" CloudUser : refers to
|
|
|
+
|
|
|
@enduml
|
|
|
|
|
|
+
|
|
|
```
|