adjust formatting

This commit is contained in:
Gregor Wolf
2021-11-12 20:59:45 +01:00
parent ce752097d0
commit 7964c9aefd

View File

@@ -1,16 +1,34 @@
using { sap.capire.bookshop as my } from '../db/schema';
service CatalogService @(path:'/browse') {
using {sap.capire.bookshop as my} from '../db/schema';
/** For displaying lists of Books */
@readonly entity ListOfBooks as projection on Books
excluding { descr };
service CatalogService @(path : '/browse') {
/** For display in details pages */
@readonly entity Books as projection on my.Books { *,
author.name as author
} excluding { createdBy, modifiedBy };
/**
* For displaying lists of Books
*/
@readonly
entity ListOfBooks as projection on Books excluding {
descr
};
@requires: 'authenticated-user'
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
/**
* For display in details pages
*/
@readonly
entity Books as projection on my.Books {
* , author.name as author
} excluding {
createdBy,
modifiedBy
};
@requires : 'authenticated-user'
action submitOrder(book : Books:ID, quantity : Integer) returns {
stock : Integer
};
event OrderedBook : {
book : Books:ID;
quantity : Integer;
buyer : String
};
}