-
Notifications
You must be signed in to change notification settings - Fork 0
/
RESTO_Class.puml
78 lines (63 loc) · 1.33 KB
/
RESTO_Class.puml
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
@startuml
class User {
+Long id
+String username
+String password
+String email
+register(): void
+login(): boolean
}
class Customer extends User {
+String phoneNumber
+makeReservation(date: Date, time: Time, guests: int): Reservation
+viewMenu(): List<Item>
+provideFeedback(comments: String, rating: int): Feedback
}
class Staff extends User {
+String role
+updateTableAvailability(tableNumber: int, available: boolean): void
}
class Administrator extends User {
+viewReservations(): List<Reservation>
+viewFeedback(): List<Feedback>
}
class Reservation {
+Long id
+Date date
+Time time
+int tableNumber
+int guests
+sendConfirmationEmail(): void
}
class Order {
+Long id
+List<Item> items
+String status
+updateKitchen(): void
}
class Feedback {
+Long id
+String comments
+int rating
+storeFeedback(): void
}
class Item {
+Long id
+String name
+double price
}
class OrderItem {
+Long id
+int quantity
+Order order
+Item item
}
Customer "1" -- "0..*" Reservation: "makes"
Customer "1" -- "0..*" Order: "places"
Customer "1" -- "0..*" Feedback: "provides"
Order "1" o-- "0..*" OrderItem: "contains"
Item "1" -- "0..*" OrderItem: "is part of"
Reservation "1" *-- "1" Customer: "belongs to"
Order "1" *-- "1" Customer: "belongs to"
Feedback "1" *-- "1" Customer: "belongs to"
@enduml