This repository was archived by the owner on Aug 29, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,3 @@ service AdminService @(requires:'admin') {
33 entity Books as projection on my .Books ;
44 entity Authors as projection on my .Authors ;
55}
6-
7- //Since ID is computed, we can hide the popup for ID on Create
8- annotate AdminService.Books with { ID @ Core . Computed ; }
9- annotate AdminService.Authors with { ID @ Core . Computed ; }
Original file line number Diff line number Diff line change 1- using {sap .capire .bookshop as my } from ' ../db/schema' ;
1+ using { sap .capire .bookshop as my } from ' ../db/schema' ;
2+ service CatalogService @ (path : ' /browse ' ) {
23
3- service CatalogService @ (path : ' /browse ' ) {
4+ /** For displaying lists of Books */
5+ @ readonly entity ListOfBooks as projection on Books
6+ excluding { descr };
47
5- /**
6- * For displaying lists of Books
7- */
8- @ readonly
9- entity ListOfBooks as projection on Books excluding {
10- descr
11- };
8+ /** For display in details pages */
9+ @ readonly entity Books as projection on my .Books { *,
10+ author .name as author
11+ } excluding { createdBy , modifiedBy };
1212
13- /**
14- * For display in details pages
15- */
16- @ readonly
17- entity Books as projection on my .Books {
18- * , author .name as authorName
19- } excluding {
20- createdBy ,
21- modifiedBy
22- };
23-
24- @ readonly
25- entity Authors as projection on my .Authors {
26- * , books : redirected to Books
27- } excluding {
28- createdBy ,
29- modifiedBy
30- };
31-
32- @ requires : ' authenticated-user '
33- action submitOrder (book : Books : ID , quantity : Integer ) returns {
34- stock : Integer
35- };
36-
37- event OrderedBook : {
38- book : Books : ID ;
39- quantity : Integer ;
40- buyer : String
41- };
13+ @ requires : ' authenticated-user '
14+ action submitOrder ( book : Books : ID , amount : Integer ) returns { stock : Integer };
15+ event OrderedBook : { book : Books : ID ; amount : Integer ; buyer : String };
4216}
You can’t perform that action at this time.
0 commit comments