pdm binding

This commit is contained in:
Wolfgang Koch
2020-11-13 12:02:01 +01:00
parent ba015431bd
commit a14c0e4eeb
2 changed files with 8 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
using { sap.capire.bookshop } from './schema'; using { sap.capire.bookshop } from './schema';
// annotations for Data Privacy // annotations for Data Privacy
annotate bookshop.Customers with @PersonalData.DataSubjectRole: 'Customer';
annotate bookshop.Customers with @PersonalData.EntitySemantics: 'DataSubject' annotate bookshop.Customers with @PersonalData.EntitySemantics: 'DataSubject'
{ {
ID @PersonalData.FieldSemantics: 'DataSubjectID'; ID @PersonalData.FieldSemantics: 'DataSubjectID';
@@ -12,6 +13,7 @@ annotate bookshop.Customers with @PersonalData.EntitySemantics: 'DataSubject'
dateOfBirth @PersonalData.IsPotentiallyPersonal; dateOfBirth @PersonalData.IsPotentiallyPersonal;
} }
annotate bookshop.CustomerPostalAddress with @PersonalData.DataSubjectRole: 'Customer';
annotate bookshop.CustomerPostalAddress with @PersonalData.EntitySemantics: 'DataSubjectDetails' annotate bookshop.CustomerPostalAddress with @PersonalData.EntitySemantics: 'DataSubjectDetails'
{ {
Customer @PersonalData.FieldSemantics: 'DataSubjectID'; Customer @PersonalData.FieldSemantics: 'DataSubjectID';

View File

@@ -14,7 +14,7 @@ using { sap.capire.bookshop.OrderItems } from '@capire/orders';
// create view on Orders and Items as flat projection // create view on Orders and Items as flat projection
entity OrderItemView as entity OrderItemView as
SELECT from Orders SELECT from Orders
{ key ID, { ID,
key Items.ID as Item_ID, key Items.ID as Item_ID,
OrderNo, OrderNo,
Customer.ID as Customer_ID, Customer.ID as Customer_ID,
@@ -25,11 +25,15 @@ using { sap.capire.bookshop.OrderItems } from '@capire/orders';
// annotate new view // annotate new view
annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics: 'LegalGround') annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics: 'LegalGround')
{ {
Item_ID @PersonalData.FieldSemantics: 'LegalGroundID';
Customer_ID @PersonalData.FieldSemantics: 'DataSubjectID'; Customer_ID @PersonalData.FieldSemantics: 'DataSubjectID';
Customer_Email @PersonalData.IsPotentiallyPersonal; Customer_Email @PersonalData.IsPotentiallyPersonal;
}; };
annotate Customers with @PersonalData.DataSubjectRole: 'Customer';
annotate CustomerPostalAddress with @PersonalData.DataSubjectRole: 'Customer';
annotate PDMService.OrderItemView with @PersonalData.DataSubjectRole: 'Customer';
// Data Privacy annotations on 'Customers' and 'CustomerPostalAddress' are derived from original entity definitions // Data Privacy annotations on 'Customers' and 'CustomerPostalAddress' are derived from original entity definitions
}; };