mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-30 18:33:42 +02:00
Closes #76 Co-auther-by: Denis Natusch <denis.natusch@mailbox.tu-dresden.de>
86 lines
2.3 KiB
Plaintext
86 lines
2.3 KiB
Plaintext
@startuml
|
|
skinparam linetype ortho
|
|
skinparam groupInheritance 2
|
|
|
|
package Spring {
|
|
interface Model
|
|
}
|
|
|
|
package Salespoint {
|
|
interface OrderManager <T extends Order>
|
|
class Cart
|
|
class Cash
|
|
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
|
|
+ getDurationInSeconds(start:LocalDateTime,finish:LocalDateTime): long
|
|
+ getDurationInHours(start:LocalDateTime,finish:LocalDateTime): long
|
|
+ min(a:LocalDateTime,b:LocalDateTime): LocalDateTime
|
|
+ max(b:LocalDateTime,b:LocalDateTime): LocalDateTime
|
|
+ getDurationInSecondsDuringMonth(month:YearMonth): long
|
|
}
|
|
CustomOrder ..> time.LocalDateTime
|
|
CustomOrder ..> time.YearMonth
|
|
|
|
enum EventType {
|
|
EVENT_CATERING
|
|
RENT_A_COOK
|
|
BREAKFAST_SERVICE
|
|
PARTY_SERVICE
|
|
}
|
|
|
|
note "This could be extended, too" as N1
|
|
|
|
class OrderController {
|
|
+ OrderController()
|
|
+ initializeCart() : Cart
|
|
+ planEvent(model : Model) : String
|
|
+ addProduct(productForm : ProductForm, model : Model) : String
|
|
+ removeProduct(product : Product, model : Model) : String
|
|
+ checkout(userAccount : UserAccount, model : Model) : String
|
|
+ getOrders(model : Model) : String
|
|
+ removeOrder(order : Order) : boolean
|
|
+ invoice(model : Model, userAccount : UserAccount, order : Order) : String
|
|
}
|
|
|
|
class ProductForm
|
|
|
|
OrderController ---> OrderManager : "-orderManager"
|
|
OrderController ---> Cart : "-cart"
|
|
OrderController ..> Model
|
|
OrderController ...> UserAccount
|
|
OrderController ...> OrderStatus
|
|
OrderController ...> Cash
|
|
OrderController ...> Quantity
|
|
OrderController ...> CustomOrder
|
|
CustomOrder o--- "1" EventType : -eventType
|
|
OrderController ...> ProductForm
|
|
N1 ..> EventType
|
|
}
|
|
|
|
OrderController ...> Salespoint.Product
|
|
CustomOrder --|> Salespoint.Order
|
|
CustomOrder ...> time.LocalDateTime
|
|
CustomOrder ...> time.DateTimeFormatter
|
|
OrderController .....> catering.orderCatalog.OrderCatalogEntry
|
|
|
|
package time {
|
|
class LocalDateTime
|
|
class DateTimeFormatter
|
|
class YearMonth
|
|
}
|
|
|
|
@enduml
|