mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update catalog design model
This commit is contained in:
parent
8815cbe6eb
commit
6060c8081e
|
@ -17,27 +17,34 @@ package Salespoint {
|
|||
interface DataInitializer
|
||||
interface Inventory << T > InventoryItem >>
|
||||
class Product {
|
||||
- name : String
|
||||
+ Product(name : String, price : javax.money.MonetaryAmount, [Metric : metric])
|
||||
+ getID() : Product.Identifier
|
||||
'+ addCategory(category : String) : boolean' #TODO: for class Inventory
|
||||
'+ removeCategory(category : String) : boolean' #TODO: for class Inventory
|
||||
'+ supports(quantity : Quantity) : boolean' #TODO: for class Cart
|
||||
+ getCategories() : Streamable<String>
|
||||
'+ addCategory(category : String) : boolean
|
||||
'+ removeCategory(category : String) : boolean
|
||||
+ getName() : String
|
||||
+ getPrice() : @NonNull javax.money.MonetaryAmount
|
||||
'+ setPrice() : @NonNull javax.money.MonetaryAmount
|
||||
'+ supports(quantity : Quantity) : boolean
|
||||
|
||||
}
|
||||
class Quantity {
|
||||
+ getAmount() : @NotNull BigDecimal
|
||||
}
|
||||
' class Quantity {
|
||||
' + getAmount() : @NotNull BigDecimal
|
||||
' }
|
||||
}
|
||||
|
||||
package catering.catalog {
|
||||
interface CateringCatalog {
|
||||
interface RentableCatalog {
|
||||
+ DEFAULT_SORT : Sort
|
||||
}
|
||||
CateringCatalog --o CatalogController : "-catalog"
|
||||
CateringCatalog ..> Catalog : "<bind> <T->Product"
|
||||
interface ConsumableCatalog {
|
||||
+ DEFAULT_SORT : Sort
|
||||
}
|
||||
RentableCatalog --o CatalogController : "-rentableCatalog"
|
||||
RentableCatalog ..> Catalog : "<bind> <T->Rentable"
|
||||
ConsumableCatalog --o CatalogController : "-consumableCatalog"
|
||||
ConsumableCatalog ..> Catalog : "<bind> <T->Catalog"
|
||||
|
||||
class CatalogController {
|
||||
+ CatalogController()
|
||||
|
@ -53,21 +60,32 @@ package catering.catalog {
|
|||
}
|
||||
|
||||
class Consumable {
|
||||
- wholesalePrice : javax.money.MonetaryAmount
|
||||
'- wholesalePrice : javax.money.MonetaryAmount
|
||||
- retailPrice : javax.money.MonetaryAmount
|
||||
- promotionPrice : javax.money.MonetaryAmount
|
||||
+ getWholesalePrice() : javax.money.MonetaryAmount
|
||||
+ Consumable(name : String, price : javax.money.MonetaryAmount) : Consumable
|
||||
+ getPrice() : javax.money.MonetaryAmount
|
||||
+ setPrice() : javax.money.MonetaryAmount
|
||||
'+ setWholeSalePrice(price : javax.money.MonetaryAmount)
|
||||
+ setRetailPrice(price : javax.money.MonetaryAmount)
|
||||
+ setPromotionPrice(price : javax.money.MonetaryAmount)
|
||||
}
|
||||
Consumable --|> Product
|
||||
|
||||
class Rentable {
|
||||
- pricePerHour : javax.money.MonetaryAmount
|
||||
- Events : Streamable<Event>
|
||||
+ getPrice() : javax.money.MonetaryAmount
|
||||
|
||||
+ Rentable(name : String, pricePerHour : javax.money.MonetaryAmount) : Rentable
|
||||
+ getPrice() : javax.money.MonetaryAmount 'return pricePerHour'
|
||||
+ setPrice(price : javax.money.MonetaryAmount)
|
||||
}
|
||||
Rentable --|> Product
|
||||
|
||||
class CatalogDataInitalizer {
|
||||
- rentableCatalog : RentableCatalog
|
||||
- consumableCatalog : ConsumableCatalog
|
||||
+ initalize()
|
||||
}
|
||||
CatalogDataInitalizer ..|> DataInitializer
|
||||
}
|
||||
|
||||
'#TODO: to determine which Products of a Category to offer I need to retrieve information about availability of e.g. Cooks and ServicePersonel from the Users or Rentables from the Inventory'
|
||||
|
|
BIN
src/main/asciidoc/models/design/catalog.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/catalog.svg
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in a new issue