S++Core systems, human-reviewable
DEMO SOURCE · SPP / APP / PHYRead the book

petshop-00-model.spp

petshop/catalogue/petshop-00-model.spp

Download original file · Petstore source contents

1domain petshop;23Role Goods {4    business("Goods number used for selection, inventory and settled order lines") String sku;5    String category;6    String name;7    String description;8    BigDecimal(19, 2) price;9    boolean active;10}1112Reference StockLine from inventory.StockLine {13    Goods goods;14    quantum int available;15    quantum int reserved;16    quantum int sold;17}1819Reference StockSupply from inventory.StockSupply {20    Goods goods;21    quantum int balance;22}2324Contract StockReceiptAgreement {25    Goods goods;26    StockLine stock;27    StockSupply source;28    int quantity;29}3031Contract StoreOpeningAgreement {32    String tradingName;33    String shopName;34}