adjust formatting
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user