diff --git a/src/main/asciidoc/models/design/catalog.puml b/src/main/asciidoc/models/design/catalog.puml index d28d1e8..171cc7c 100644 --- a/src/main/asciidoc/models/design/catalog.puml +++ b/src/main/asciidoc/models/design/catalog.puml @@ -2,6 +2,10 @@ skinparam linetype ortho skinparam groupInheritance 2 +package javax.money { + class MonetaryAmount +} + package Spring { interface Model class Sort @@ -18,14 +22,15 @@ package Salespoint { interface Inventory << T > InventoryItem >> class Product { - name : String - + Product(name : String, price : javax.money.MonetaryAmount, [Metric : metric]) + - price : MonetaryAmount + + Product(name : String, price : MonetaryAmount, [Metric : metric]) + getID() : Product.Identifier + getCategories() : Streamable '+ addCategory(category : String) : boolean '+ removeCategory(category : String) : boolean + getName() : String - + getPrice() : @NonNull javax.money.MonetaryAmount - '+ setPrice() : @NonNull javax.money.MonetaryAmount + + getPrice() : @NonNull MonetaryAmount + + setPrice(MonetaryAmount) : void '+ supports(quantity : Quantity) : boolean } @@ -60,23 +65,23 @@ package catering.catalog { } class Consumable { - '- wholesalePrice : javax.money.MonetaryAmount - - retailPrice : javax.money.MonetaryAmount - - promotionPrice : 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) + - promotionPrice : MonetaryAmount + - wholesalePrice : MonetaryAmount + + Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount) : Consumable + + Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : MonetaryAmount) : Consumable + + getPrice() : MonetaryAmount + + getRetailPrice() : MonetaryAmount + + setPrice(price : MonetaryAmount) : void + + getPromotionPrice(): MonetaryAmount + + setPromotionPrice(price : MonetaryAmount) + + getWholeSalePrice() : MonetaryAmount + + setWholeSalePrice(price : MonetaryAmount) } Consumable --|> Product + Consumable ..> MonetaryAmount : use class Rentable { - - pricePerHour : javax.money.MonetaryAmount - + Rentable(name : String, pricePerHour : javax.money.MonetaryAmount) : Rentable - + getPrice() : javax.money.MonetaryAmount 'return pricePerHour' - + setPrice(price : javax.money.MonetaryAmount) + + Rentable(name : String, pricePerHour : MonetaryAmount) : Rentable } Rentable --|> Product diff --git a/src/main/asciidoc/models/design/catalog.svg b/src/main/asciidoc/models/design/catalog.svg index af712ab..fdb7257 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:0812ee83ba5c757e7681a031955b82a1b2b04ead33bc384ea71c095beecb1f50 -size 34714 +oid sha256:52fe93917df1aeb09ed27224f70d1f7e3a6460b7ca2daeacb575bbe134bb0922 +size 38640