mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Improve order-diagram with custom order and order type
This commit is contained in:
parent
003e9f39c8
commit
7ae01c17eb
|
@ -16,31 +16,64 @@ package Salespoint {
|
|||
class Order
|
||||
class Quantity
|
||||
class UserAccount
|
||||
class Product
|
||||
enum OrderStatus
|
||||
|
||||
note "Uses Rentable and Consumable from package Catalog" as N2
|
||||
Product .. N2
|
||||
}
|
||||
|
||||
|
||||
package catering.order {
|
||||
class CustomOrder {
|
||||
- start : LocalDateTime
|
||||
- finish : LocalDateTime
|
||||
}
|
||||
|
||||
enum OrderType {
|
||||
EVENT_CATERIN
|
||||
RENT_A_COOK
|
||||
BREAKFAST_SERVICE
|
||||
SOMETHING_ELSE
|
||||
}
|
||||
|
||||
note "This could be extended, too" as N1
|
||||
|
||||
class OrderController {
|
||||
+ OrderController()
|
||||
+ initializeCart() : Cart
|
||||
+ addProductToCart(product : Product, amount : int, cart: Cart)
|
||||
+ addProductToOrder(product : Product, order : Order, amount : int)
|
||||
+ removeProductFromOrder(product : Product, order : Order, amount : int)
|
||||
+ complete(cart : Cart, userAccount : UserAccount) : String
|
||||
+ getCompletedOrders(model : Model) : String
|
||||
+ getOrders(model : Model) : String
|
||||
+ cancelOrder(order : Order) : boolean
|
||||
+ getWorkingHours(employee : Employee) : Map<Day, Hours>
|
||||
+ getRents(rentable : Rentable) : List<Tuple<DayTime>>
|
||||
+ TODOOO()
|
||||
}
|
||||
|
||||
OrderController --> OrderManager : "-orderManager"
|
||||
OrderController ---> OrderManager : "-orderManager"
|
||||
OrderController ..> Model
|
||||
OrderController ..> UserAccount
|
||||
OrderController ..> Order
|
||||
OrderController ..> OrderStatus
|
||||
OrderController ..> Cash
|
||||
OrderController ..> Quantity
|
||||
OrderController ..> Cart
|
||||
OrderController ...> UserAccount
|
||||
OrderController ...> Order
|
||||
OrderController ...> OrderStatus
|
||||
OrderController ...> Cash
|
||||
OrderController ...> Quantity
|
||||
OrderController ...> Cart
|
||||
OrderController ...> CustomOrder
|
||||
CustomOrder o--- "1" OrderType : -orderType
|
||||
N1 ..> OrderType
|
||||
}
|
||||
|
||||
OrderController ...> Salespoint.Product
|
||||
CustomOrder ---|> Salespoint.Order
|
||||
CustomOrder ...> time.LocalDateTime
|
||||
CustomOrder ...> time.DateTimeFormatter
|
||||
|
||||
package time {
|
||||
class LocalDateTime
|
||||
class DateTimeFormatter
|
||||
}
|
||||
|
||||
@enduml
|
BIN
src/main/asciidoc/models/design/order.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/order.svg
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue