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 goods;6String name;7int quantity;8BigDecimal(19, 2) unitPrice;9BigDecimal(19, 2) amount;10}1112take Goods as OrderLine {13Goods goods = Goods;14String name = name;15BigDecimal unitPrice = price;16}1718Contract ShopOrder {19business("Order reference presented to the buyer") String orderNumber;20Buyer buyer;21OrderStatus status;22OrderLine[] lines;23int reservedQuantity;24BigDecimal(19, 2) subtotal;25BigDecimal(19, 2) discount;26BigDecimal(19, 2) shipping;27BigDecimal(19, 2) total;28String address;29String tracking;30String reason;31}3233Contract UnpaidCancellationAgreement {34Buyer buyer;35ShopOrder order;36String reason;37Receipt receipt;38int releasedQuantity;39}4041Contract PaidCancellationAgreement {42Buyer buyer;43Merchant seller;44ShopOrder order;45String reason;46Receipt receipt;47int releasedQuantity;48BigDecimal(19, 2) refundAmount;49}