From 1ea4b15d77229b238f622f9e38c8b31244d5fa04 Mon Sep 17 00:00:00 2001 From: Daniel Hutzel Date: Thu, 2 Nov 2023 08:40:01 +0530 Subject: [PATCH] . --- bookstore/srv/mashup.cds | 23 ++++++----------------- etc/samples.drawio.svg | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/bookstore/srv/mashup.cds b/bookstore/srv/mashup.cds index 7344ff1a..74b8f4cb 100644 --- a/bookstore/srv/mashup.cds +++ b/bookstore/srv/mashup.cds @@ -4,20 +4,16 @@ // respective reuse packages and services // -using { sap.capire.bookshop.Books } from '@capire/bookshop'; // // Extend Books with access to Reviews and average ratings // +using { sap.capire.bookshop.Books } from '@capire/bookshop'; using { ReviewsService.Reviews } from '@capire/reviews'; extend Books with { reviews : Composition of many Reviews on reviews.subject = $self.ID; - - @Common.Label : '{i18n>Rating}' - rating : Decimal; - - @Common.Label : '{i18n>NumberOfReviews}' - numberOfReviews : Integer; + rating : type of Reviews:rating; // average rating + numberOfReviews : Integer @title : '{i18n>NumberOfReviews}'; } @@ -25,18 +21,11 @@ extend Books with { // Extend Orders with Books as Products // using { sap.capire.orders.Orders } from '@capire/orders'; -extend Orders with { - extend Items with { - book : Association to Books on product.ID = book.ID - } +extend Orders:Items with { + book : Association to Books on product.ID = book.ID } - -// Add orders fiori app (in case of embedded orders service) +// Ensure models from all imported packages are loaded using from '@capire/orders/app/fiori'; - -// Add data browser using from '@capire/data-viewer'; - -// Incorporate pre-build extensions from... using from '@capire/common'; diff --git a/etc/samples.drawio.svg b/etc/samples.drawio.svg index 2588e138..43febc30 100644 --- a/etc/samples.drawio.svg +++ b/etc/samples.drawio.svg @@ -1,4 +1,4 @@ - +