20 lines
610 B
Plaintext
20 lines
610 B
Plaintext
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;
|
|
}
|