22 lines
740 B
Plaintext
22 lines
740 B
Plaintext
using { sap.capire.bookshop as my } from '../db/schema';
|
|
service CatalogService @(path:'/browse') {
|
|
|
|
/** For displaying lists of Books */
|
|
@readonly entity ListOfBooks as projection on Books
|
|
excluding { descr };
|
|
|
|
/** For display in details pages */
|
|
@readonly entity Books as projection on my.Books { *,
|
|
author.name as author
|
|
} excluding { createdBy, modifiedBy };
|
|
|
|
<<<<<<< HEAD
|
|
@requires_: 'authenticated-user'
|
|
action submitOrder (book : Integer, amount: Integer);
|
|
=======
|
|
@requires: 'authenticated-user'
|
|
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
|
|
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
|
|
>>>>>>> 534af7ffee60e086c563dbaa450e86e5fca5cf2b
|
|
}
|