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 Order
class Quantity class Quantity
class UserAccount class UserAccount
class Product
enum OrderStatus enum OrderStatus
note "Uses Rentable and Consumable from package Catalog" as N2
Product .. N2
} }
package catering.order { 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 { class OrderController {
+ OrderController() + OrderController()
+ initializeCart() : Cart + initializeCart() : Cart
+ addProductToCart(product : Product, amount : int, cart: 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 + complete(cart : Cart, userAccount : UserAccount) : String
+ getCompletedOrders(model : Model) : String + getOrders(model : Model) : String
+ cancelOrder(order : Order) : boolean + cancelOrder(order : Order) : boolean
+ getWorkingHours(employee : Employee) : Map<Day, Hours> + getWorkingHours(employee : Employee) : Map<Day, Hours>
+ getRents(rentable : Rentable) : List<Tuple<DayTime>>
+ TODOOO() + TODOOO()
} }
OrderController --> OrderManager : "-orderManager" OrderController ---> OrderManager : "-orderManager"
OrderController ..> Model OrderController ..> Model
OrderController ..> UserAccount OrderController ...> UserAccount
OrderController ..> Order OrderController ...> Order
OrderController ..> OrderStatus OrderController ...> OrderStatus
OrderController ..> Cash OrderController ...> Cash
OrderController ..> Quantity OrderController ...> Quantity
OrderController ..> Cart OrderController ...> Cart
OrderController ...> CustomOrder
CustomOrder o--- "1" OrderType : -orderType
N1 ..> OrderType
}
OrderController ...> Salespoint.Product OrderController ...> Salespoint.Product
CustomOrder ---|> Salespoint.Order
CustomOrder ...> time.LocalDateTime
CustomOrder ...> time.DateTimeFormatter
package time {
class LocalDateTime
class DateTimeFormatter
} }
@enduml @enduml

BIN
src/main/asciidoc/models/design/order.svg (Stored with Git LFS)

Binary file not shown.