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';
// annotations for Data Privacy
annotate bookshop.Customers with @PersonalData.DataSubjectRole: 'Customer';
annotate bookshop.Customers with @PersonalData.EntitySemantics: 'DataSubject'
{
ID @PersonalData.FieldSemantics: 'DataSubjectID';
@@ -12,6 +13,7 @@ annotate bookshop.Customers with @PersonalData.EntitySemantics: 'DataSubject'
dateOfBirth @PersonalData.IsPotentiallyPersonal;
}
annotate bookshop.CustomerPostalAddress with @PersonalData.DataSubjectRole: 'Customer';
annotate bookshop.CustomerPostalAddress with @PersonalData.EntitySemantics: 'DataSubjectDetails'
{
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
entity OrderItemView as
SELECT from Orders
{ key ID,
{ ID,
key Items.ID as Item_ID,
OrderNo,
Customer.ID as Customer_ID,
@@ -25,11 +25,15 @@ using { sap.capire.bookshop.OrderItems } from '@capire/orders';
// annotate new view
annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics: 'LegalGround')
{
{
Item_ID @PersonalData.FieldSemantics: 'LegalGroundID';
Customer_ID @PersonalData.FieldSemantics: 'DataSubjectID';
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
};