diff --git a/src/main/asciidoc/models/design/catalog.puml b/src/main/asciidoc/models/design/catalog.puml index b70f0c5..d28d1e8 100644 --- a/src/main/asciidoc/models/design/catalog.puml +++ b/src/main/asciidoc/models/design/catalog.puml @@ -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 + '+ 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 : " Product" + interface ConsumableCatalog { + + DEFAULT_SORT : Sort + } + RentableCatalog --o CatalogController : "-rentableCatalog" + RentableCatalog ..> Catalog : " Rentable" + ConsumableCatalog --o CatalogController : "-consumableCatalog" + ConsumableCatalog ..> Catalog : " 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 - + 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' diff --git a/src/main/asciidoc/models/design/catalog.svg b/src/main/asciidoc/models/design/catalog.svg index 6c583e9..af712ab 100644 --- a/src/main/asciidoc/models/design/catalog.svg +++ b/src/main/asciidoc/models/design/catalog.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08b775d307e62715b0ee682912c0f817db78cb666fc2154834220db2590a256a -size 29290 +oid sha256:0812ee83ba5c757e7681a031955b82a1b2b04ead33bc384ea71c095beecb1f50 +size 34714