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