S++Business systems language
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}1112take Product as Goods {13    mapsame;14    String sku = productCode;15}1617Reference StockLine from inventory.StockLine {18    Goods goods;19    quantum int available;20    quantum int reserved;21    quantum int sold;22}2324Reference StockSupply from inventory.StockSupply {25    Goods goods;26    quantum int balance;27}2829Contract StockReceiptAgreement {30    Goods goods;31    StockLine stock;32    StockSupply source;33    int quantity;34}3536Contract StoreOpeningAgreement {37    String tradingName;38    String shopName;39}