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