This commit is contained in:
Daniel Hutzel
2023-11-02 08:40:01 +05:30
parent 9291e8e7c9
commit 1ea4b15d77
2 changed files with 7 additions and 18 deletions

View File

@@ -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';