CAA160 exercise 3 final state

This commit is contained in:
Marc Becker
2019-09-18 07:17:48 +00:00
parent 7b3f8ac974
commit b603a4bf48
13 changed files with 425 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using { sap.capire.bookstore as db } from '../db/schema';
// Define Books Service
service BooksService {
@readonly entity Books as projection on db.Books { *, category as genre } excluding { category, createdBy, createdAt, modifiedBy, modifiedAt };
@readonly entity Authors as projection on db.Authors;
}
// Define Orders Service
service OrdersService {
entity Orders as projection on db.Orders;
// OrderItems are auto exposed
}
// Reuse Admin Service
using { AdminService } from '@sap/capire-products';
extend service AdminService with {
entity Authors as projection on db.Authors;
}