Improve order-diagram with custom order and order type

This commit is contained in:
Mathis Kral 2023-11-06 19:14:41 +01:00 committed by Simon Bruder
parent 003e9f39c8
commit 7ae01c17eb
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 44 additions and 11 deletions

View file

@ -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 ...> Salespoint.Product
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)

Binary file not shown.