-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDataModel.puml
More file actions
115 lines (94 loc) · 2.06 KB
/
DataModel.puml
File metadata and controls
115 lines (94 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@startuml
interface IEmailVerificationRequest {
username: string
confirmationCode: number
}
interface IImage {
srcUrl: string
}
interface IBaseIngredient {
id: number
name: string
category: string
}
interface IIngredientQuantity {
quantity: IUnit
quantityUnits: sring[]
}
interface IIngredient extends IBaseIngredient, IIngredientQuantity {
nutrients?: INutrient[]
}
interface IInventoryIngredient extends IBaseIngredient {
expirationDate: number | null
}
interface IShoppinIngredient extends IBaseIngredient, IIngredientQuantity {
itemID?: string
recipeID?: number
}
interface IInstruction {
instructions: string
ingredients: IIngredient[]
}
interface INutrient {
name: string
unit: IUnit
percentOfDaily: number
}
interface IBaseRecipe {
id: number
name: string
image: IImage
ingredients: IIngredient
}
interface IRecipe extends IBaseRecipe {
cuisines: string[]
diets: string[]
mealTypes: string[]
instruction: IInstruction
nutritionFacts: INutrient[]
instructionSteps: IInstruction[]
servings: number
cookingTimeInMinutes: number
preparationTimeInMinutes: number
totalCost: number
costPerServing: number
}
interface IUserRecipe extends IRecipe {
isFavorite: boolean
hasAllergens: boolean
}
interface IUserBaseRecipe extends IBaseRecipe {
isFavorite: boolean
hasAllergens: boolean
}
class Token {
accessToken: string
refreshToken: string
}
interface IUnit {
unit: string
value: number
}
interface IBaseUser {
firstName: string
lastName: string
lastSeen: number
}
interface IContactInformation {
email: string
}
interface ICredentials extends IIdentification {
password: string
}
interface IIdentification {
username: string
}
interface IUser extends IBaseUser, ICredentials, IContactInformation {
isVerified: boolean
profilePicture: IImage
inventory: IInventoryIngredient[]
shoppingList: IShoppinIngredient[]
allergens: IBaseIngredient[]
favoriteRecipes: IBaseRecipe[]
}
@enduml