S++Business systems language
DEMO SOURCE · SPP / APP / PHYRead the book

petshop-00-model.spp

petshop/membership/petshop-00-model.spp

Download original file · Petstore source contents

1domain petshop;23Role Buyer {4    business("Membership account number used to identify the buyer and verify order ownership") String membershipNumber;5    business("Registration number of the linked customer-domain subject") String customerNumber;6    String name;7    String email;8    String address;9    MemberTier tier;10    quantum BigDecimal(19, 2) wallet;11}1213take Person as Buyer {14    mapsame;15}1617Contract RegistrationAgreement {18    Buyer buyer;19    Cart cart;20    Receipt receipt;21}2223Contract ProfileAgreement {24    Buyer buyer;25    String newName;26    String newEmail;27    String newAddress;28    MemberTier newTier;29    Receipt receipt;30}