2023-11-02 06:33:27 +01:00
|
|
|
@startuml
|
|
|
|
skinparam linetype ortho
|
|
|
|
skinparam groupInheritance 2
|
|
|
|
|
|
|
|
package Spring {
|
|
|
|
interface Model
|
|
|
|
}
|
|
|
|
|
|
|
|
package Salespoint {
|
2023-11-08 19:48:38 +01:00
|
|
|
interface OrderManager <T extends Order>
|
2023-11-02 06:33:27 +01:00
|
|
|
class Cart
|
|
|
|
class Cash
|
|
|
|
class Order
|
|
|
|
class Quantity
|
|
|
|
class UserAccount
|
2023-11-06 19:14:41 +01:00
|
|
|
class Product
|
2023-11-02 06:33:27 +01:00
|
|
|
enum OrderStatus
|
2023-11-06 19:14:41 +01:00
|
|
|
|
|
|
|
note "Uses Rentable and Consumable from package Catalog" as N2
|
|
|
|
Product .. N2
|
2023-11-02 06:33:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
package catering.order {
|
2023-11-06 19:14:41 +01:00
|
|
|
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
|
|
|
|
|
2023-11-02 06:33:27 +01:00
|
|
|
class OrderController {
|
|
|
|
+ OrderController()
|
|
|
|
+ initializeCart() : Cart
|
2023-11-08 19:48:38 +01:00
|
|
|
+ planEvent(model : Model) : String
|
|
|
|
+ addProduct(productForm : ProductForm, model : Model) : String
|
|
|
|
+ removeProduct(product : Product, model : Model) : String
|
|
|
|
+ checkout(userAccount : UserAccount, model : Model) : String
|
2023-11-06 19:14:41 +01:00
|
|
|
+ getOrders(model : Model) : String
|
2023-11-08 19:48:38 +01:00
|
|
|
+ removeOrder(order : Order) : boolean
|
2023-11-02 06:33:27 +01:00
|
|
|
}
|
2023-11-02 19:27:27 +01:00
|
|
|
|
2023-11-08 19:48:38 +01:00
|
|
|
class ProductForm
|
|
|
|
|
2023-11-06 19:14:41 +01:00
|
|
|
OrderController ---> OrderManager : "-orderManager"
|
2023-11-08 19:48:38 +01:00
|
|
|
OrderController ---> Cart : "-cart"
|
2023-11-02 19:27:27 +01:00
|
|
|
OrderController ..> Model
|
2023-11-06 19:14:41 +01:00
|
|
|
OrderController ...> UserAccount
|
|
|
|
OrderController ...> OrderStatus
|
|
|
|
OrderController ...> Cash
|
|
|
|
OrderController ...> Quantity
|
|
|
|
OrderController ...> CustomOrder
|
|
|
|
CustomOrder o--- "1" OrderType : -orderType
|
2023-11-08 19:48:38 +01:00
|
|
|
OrderController ...> ProductForm
|
2023-11-06 19:14:41 +01:00
|
|
|
N1 ..> OrderType
|
|
|
|
}
|
|
|
|
|
|
|
|
OrderController ...> Salespoint.Product
|
|
|
|
CustomOrder ---|> Salespoint.Order
|
|
|
|
CustomOrder ...> time.LocalDateTime
|
|
|
|
CustomOrder ...> time.DateTimeFormatter
|
|
|
|
|
|
|
|
package time {
|
|
|
|
class LocalDateTime
|
|
|
|
class DateTimeFormatter
|
2023-11-02 06:33:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@enduml
|