merge main
This commit is contained in:
@@ -8,7 +8,7 @@ entity Books : managed {
|
||||
author : Association to Authors @mandatory;
|
||||
genre : Association to Genres;
|
||||
stock : Integer;
|
||||
price : Decimal;
|
||||
price : Price;
|
||||
currency : Currency;
|
||||
image : LargeBinary @Core.MediaType: 'image/png';
|
||||
}
|
||||
@@ -29,3 +29,5 @@ entity Genres : sap.common.CodeList {
|
||||
parent : Association to Genres;
|
||||
children : Composition of many Genres on children.parent = $self;
|
||||
}
|
||||
|
||||
type Price : Decimal(9,2);
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
"app",
|
||||
"srv",
|
||||
"db",
|
||||
"index.cds",
|
||||
"index.js"
|
||||
"index.cds"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@cap-js/sqlite": "*"
|
||||
|
||||
2
bookshop/srv/access-control.cds
Normal file
2
bookshop/srv/access-control.cds
Normal file
@@ -0,0 +1,2 @@
|
||||
using { AdminService } from './admin-service';
|
||||
annotate AdminService with @requires:'admin';
|
||||
@@ -1,5 +1,6 @@
|
||||
using { sap.capire.bookshop as my } from '../db/schema';
|
||||
service AdminService @(requires:'admin', path:'/admin') {
|
||||
entity Books as projection on my.Books;
|
||||
service AdminService @(path:'/admin') {
|
||||
entity Authors as projection on my.Authors;
|
||||
entity Books as projection on my.Books;
|
||||
entity Genres as projection on my.Genres;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user