Refactor db parts
This commit is contained in:
committed by
Christian Georgi
parent
cae45fcd87
commit
babb5780b0
@@ -1,13 +1,4 @@
|
|||||||
namespace sap.capire.bookshop;
|
using { sap.capire.bookshop } from '../../db/common';
|
||||||
|
|
||||||
using { sap.capire.bookshop } from '@capire/bookstore/srv/mashup';
|
|
||||||
|
|
||||||
entity GenreHierarchy : bookshop.Genres {
|
|
||||||
hierarchyLevel : Integer default 0;
|
|
||||||
drillState : String default 'leaf';
|
|
||||||
parent : Association to GenreHierarchy;
|
|
||||||
children : Composition of many GenreHierarchy on children.parent = $self;
|
|
||||||
}
|
|
||||||
|
|
||||||
annotate bookshop.GenreHierarchy {
|
annotate bookshop.GenreHierarchy {
|
||||||
ID @sap.hierarchy.node.for;
|
ID @sap.hierarchy.node.for;
|
||||||
@@ -15,7 +6,3 @@ annotate bookshop.GenreHierarchy {
|
|||||||
hierarchyLevel @sap.hierarchy.level.for;
|
hierarchyLevel @sap.hierarchy.level.for;
|
||||||
drillState @sap.hierarchy.drill.state.for;
|
drillState @sap.hierarchy.drill.state.for;
|
||||||
}
|
}
|
||||||
|
|
||||||
extend service CatalogService with {
|
|
||||||
@readonly entity GenreHierarchy as projection on bookshop.GenreHierarchy;
|
|
||||||
}
|
|
||||||
|
|||||||
14
fiori/db/common.cds
Normal file
14
fiori/db/common.cds
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
namespace sap.capire.bookshop;
|
||||||
|
|
||||||
|
using { sap.capire.bookshop } from '@capire/bookstore/srv/mashup';
|
||||||
|
|
||||||
|
entity GenreHierarchy : bookshop.Genres {
|
||||||
|
hierarchyLevel : Integer default 0;
|
||||||
|
drillState : String default 'leaf';
|
||||||
|
parent : Association to GenreHierarchy;
|
||||||
|
children : Composition of many GenreHierarchy on children.parent = $self;
|
||||||
|
}
|
||||||
|
|
||||||
|
extend service CatalogService with {
|
||||||
|
@readonly entity GenreHierarchy as projection on bookshop.GenreHierarchy;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user