-
Notifications
You must be signed in to change notification settings - Fork 0
/
Class diagram.wsd
101 lines (84 loc) · 1.51 KB
/
Class diagram.wsd
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
@startuml
class Products {
int item_ID
String name
Image image
float price
int stock
ProductCategory productCategory
}
class User {
int user_ID
String name
String email
Wallet wallet
Arraylsit<Products> favorites
ArrayList<Cart> savedCarts
UserType userType
}
Class Wallet {
int wallet_ID
int fonds
ArrayList<Coupon> Coupons
ArrayList<CreditCard> CreditCards
}
class CreditCard {
int creditCard_ID
string experetionDate
string cardNumber
string cvv
string nameOfCardHolder
string nameOfCard
}
class Coupon {
}
class Purchase {
int purchase_ID
LocalDateTime purchaseDate
HashMap<Product, Integer> purchasedProducts
}
enum ProductCategory {
FRUGT_OG_GRØNT
MEJERIPRODUKTER
KØD_OG_FISK
FROST
PÅLÆG
DRIKKEVARER
BRØD_KIKS_OG_KAGER
SLIK_OG_SNACKS
}
enum UserType {
COSTUMER
WORKER
}
class Cart {
User user
ArrayList<Product> purchasedProducts
}
'medarbejder del
class Worker {
String phoneNumber
}
class Shift {
int shift_ID
LocalDateTime date
float period
String descreption
Worker workerAssigned
}
class Message {
int message_ID
LocalDateTime date
Worker sender
ArrayList<Worker> receivers
String message
}
Wallet "1" --o "0..*" Coupon
Wallet "1" --* "0..*" CreditCard
User "1" --* "1" Wallet
Cart "1" --o "0..*" Products
Worker --|> User
Shift "1" *-- "1" Worker
ProductCategory "1" o-- "1" Products
UserType "1" *-- "1" User
@enduml