add read only tree table and value help

This commit is contained in:
D070615
2025-03-20 16:20:20 +01:00
parent 737e766d53
commit 5f5b32043c
16 changed files with 249 additions and 140 deletions

View File

@@ -2,4 +2,5 @@ using { sap.capire.bookshop as my } from '../db/schema';
service AdminService @(requires:'admin', path:'/admin') {
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
entity GenreHierarchy as projection on my.Genres
}

View File

@@ -1,4 +1,7 @@
using { sap.capire.bookshop as my } from '../db/schema';
using {my.common.Hierarchy as Hierarchy} from './hierarchy';
extend my.Genres with Hierarchy;
service CatalogService @(path:'/browse') {
/** For displaying lists of Books */
@@ -10,6 +13,9 @@ service CatalogService @(path:'/browse') {
author.name as author
} excluding { createdBy, modifiedBy };
@readonly
entity GenreHierarchy as projection on my.Genres;
@requires: 'authenticated-user'
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };

View File

@@ -0,0 +1,29 @@
namespace my.common;
aspect Hierarchy {
virtual LimitedDescendantCount : Integer64;
virtual DistanceFromRoot : Integer64;
virtual DrillState : String;
virtual Matched : Boolean;
virtual MatchedDescendantCount : Integer64;
virtual LimitedRank : Integer64;
}
annotate Hierarchy with @Capabilities.FilterRestrictions.NonFilterableProperties: [
'LimitedDescendantCount',
'DistanceFromRoot',
'DrillState',
'Matched',
'MatchedDescendantCount',
'LimitedRank'
];
annotate Hierarchy with @Capabilities.SortRestrictions.NonSortableProperties: [
'LimitedDescendantCount',
'DistanceFromRoot',
'DrillState',
'Matched',
'MatchedDescendantCount',
'LimitedRank'
];