petshop-00-model.spp
petshop/order/petshop-00-model.spp
Download original file · Petstore source contents
1domain petshop;23Role OrderLine {4business("Order-line reference used to verify individual items during delivery and returns") String lineNumber;5Goods;6String name;7int quantity;8BigDecimal(19, 2) unitPrice;9BigDecimal(19, 2) amount;10}1112take Goods as OrderLine {13String name = name;14BigDecimal unitPrice = price;15}1617Contract ShopOrder {18business("Order reference presented to the buyer") String orderNumber;19Buyer buyer;20OrderStatus status;21OrderLine[] lines;22int reservedQuantity;23BigDecimal(19, 2) subtotal;24BigDecimal(19, 2) discount;25BigDecimal(19, 2) shipping;26BigDecimal(19, 2) total;27String address;28String tracking;29String reason;30}3132Contract UnpaidCancellationAgreement {33Buyer buyer;34ShopOrder order;35String reason;36Receipt receipt;37int releasedQuantity;38}3940Contract PaidCancellationAgreement {41Buyer buyer;42Merchant seller;43ShopOrder order;44String reason;45Receipt receipt;46int releasedQuantity;47BigDecimal(19, 2) refundAmount;48}