mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update order package-diagram to match current implementation
This closes #109.
This commit is contained in:
parent
b9f67b452a
commit
7b86f96976
|
@ -9,7 +9,9 @@ package Spring {
|
|||
}
|
||||
|
||||
package Salespoint {
|
||||
interface OrderManager <T extends Order>
|
||||
interface OrderManagement <CustomOrder>
|
||||
interface Repository<CustomOrder, Order.OrderIdentifier>
|
||||
class UniqueInventory<UniqueInventoryItem>
|
||||
class Cart
|
||||
class Cash
|
||||
class Order
|
||||
|
@ -22,66 +24,98 @@ package Salespoint {
|
|||
Product .. N2
|
||||
}
|
||||
|
||||
package catalog {
|
||||
interface CateringCatalog
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
package order {
|
||||
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
|
||||
+OrderController(oM: OrderManagement<CustomOrder>, cOR: CustomOrderRepository, inv: UniqueInventory<UniqueInventoryItem>, cat: CateringCatalog, stM: StaffManagement)
|
||||
+orders(model: Model, userAccount: Optional<UserAccount>): String
|
||||
+orders(model: Model): String
|
||||
+orders(model: Model, String day): String
|
||||
~initializeCart(): CustomCart
|
||||
+event(model: Model, cart: CustomCart): String
|
||||
+addEmployeeToCart(empId: long, cart: CustomCart): String
|
||||
+removeEmployeeFromCart(empId: long, cart: CustomCart): String
|
||||
+removeOrder(orderId: Order.OrderIdentifier, userAccount: Optional<UserAccount>): String
|
||||
+addProduct(product: Product, number: int, cart: CustomCart): String
|
||||
+removeProduct(itemId: String, cart: CustomCart): String
|
||||
+changeDate(start: LocalDate, startHour: Optional<Integer>, finish: LocalDate, finishHour: Optional<Integer>, cart: CustomCart): String
|
||||
+checkout(cart: CustomCart, userAccount: Optional<UserAccount>): String
|
||||
+changeOrderType(orderType: String, cart: CustomCart): String
|
||||
+{static}findFreeAmountInInterval(product: Rentable, start: LocalDatetime, finish: LocalDatetime, inv: UniqueInventory<UniqueInventoryItem>, cOR: CustomOrderRepository): Quantity
|
||||
+calender(model: Model): String
|
||||
+invoice(model: Model, userAccount: UserAccount, order: Order): String
|
||||
}
|
||||
|
||||
class ProductForm
|
||||
interface CustomOrderRepository {
|
||||
+findOrdersByInterval(start: LocalDateTime, finish: LocalDateTime): Streamable<CustomOrder>
|
||||
}
|
||||
|
||||
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
|
||||
class CustomCart {
|
||||
-formatterPattern: String
|
||||
+CustomCart(orderType: OrderType, start: LocalDateTime, finish: LocalDateTime)
|
||||
+addEmployee(employee: Employee): boolean
|
||||
+removeEmployee(employee: Employee): boolean
|
||||
+addStaffTo(order: CustomOrder): CustomOrder
|
||||
+addRentablesTo(order: CustomOrder, inv: UniqueInventory<UniqueInventoryItem>): CustomOrder
|
||||
+getDurationInHours(): int
|
||||
+getPrice(): MonetaryAmount
|
||||
+clear()
|
||||
}
|
||||
|
||||
class CustomOrder {
|
||||
-id: Long
|
||||
-formatterPattern: String
|
||||
+CustomOrder()
|
||||
+CustomOrder(identifier: UserAccount.UserAccountIdentifier, cart: CustomCart)
|
||||
+getDurationInSeconds(): long
|
||||
-getDurationInHours(start: LocalDateTime, finish: LocalDateTime): long
|
||||
-{static}min(a: LocalDateTime, b: LocalDateTime): LocalDateTime
|
||||
-{static}max(a: LocalDateTime, b: LocalDateTime): LocalDateTime
|
||||
+getDurationInSecondsDuringMonth(month: YearMonth): long
|
||||
+addEmployee(employee: Employee): boolean
|
||||
}
|
||||
|
||||
enum OrderType {
|
||||
+toHumanReadable(): String
|
||||
}
|
||||
}
|
||||
|
||||
OrderController ...> Salespoint.Product
|
||||
CustomOrder --|> Salespoint.Order
|
||||
CustomOrder ...> time.LocalDateTime
|
||||
CustomOrder ...> time.DateTimeFormatter
|
||||
OrderController .....> catering.orderCatalog.OrderCatalogEntry
|
||||
|
||||
package time {
|
||||
class LocalDateTime
|
||||
class DateTimeFormatter
|
||||
class YearMonth
|
||||
package javax.money {
|
||||
interface MonetaryAmount
|
||||
}
|
||||
|
||||
OrderController o--------> OrderManagement: -orderManagement
|
||||
OrderController o--------> CustomOrderRepository: -customOrderRepository
|
||||
CustomOrderRepository --------|> Repository
|
||||
OrderController o--------> UniqueInventory: -inventory
|
||||
OrderController o--------> catalog.CateringCatalog: -catalog
|
||||
OrderController o--------> staff.StaffManagement: -staffManagement
|
||||
OrderController ........> Product
|
||||
OrderController ........> Cash
|
||||
OrderController ........> OrderStatus
|
||||
|
||||
OrderController ........> UserAccount
|
||||
OrderController ........> time.LocalDate
|
||||
OrderController ........> time.LocalDateTime
|
||||
OrderController ........> Salespoint.Quantity
|
||||
OrderController ........> Spring.Model
|
||||
|
||||
CustomCart -------|> Cart
|
||||
CustomCart o-------> staff.Employee: -staff: Set
|
||||
CustomCart o-------> OrderType: -orderType
|
||||
CustomCart o-------> time.LocalDateTime: -start
|
||||
CustomCart o-------> time.LocalDateTime: -finish
|
||||
CustomCart ........> javax.money.MonetaryAmount
|
||||
|
||||
CustomOrder -------|> Order
|
||||
CustomOrder o-------> staff.Employee: -staff: Set
|
||||
CustomOrder o-------> OrderType: -orderType
|
||||
CustomOrder o-------> time.LocalDateTime: -start
|
||||
CustomOrder o-------> time.LocalDateTime: -finish
|
||||
CustomOrder .......> UserAccount
|
||||
CustomOrder .......> time.YearMonth
|
||||
|
||||
@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