pdm annotations

This commit is contained in:
Wolfgang Koch
2021-02-12 11:52:36 +01:00
parent caab8ed120
commit cd3f139544
2 changed files with 70 additions and 57 deletions

View File

@@ -1,37 +1,51 @@
// Proxy for importing schema from bookshop sample
using { sap.capire.bookshop } from './schema';
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';
emailAddress @PersonalData.IsPotentiallyPersonal;
firstName @PersonalData.IsPotentiallyPersonal;
lastName @PersonalData.IsPotentiallyPersonal;
creditCardNo @PersonalData.IsPotentiallySensitive;
dateOfBirth @PersonalData.IsPotentiallyPersonal;
}
annotate bookshop.Customers with @PersonalData : {
DataSubjectRole : 'Customer',
EntitySemantics : 'DataSubject'
}
{
ID @PersonalData.FieldSemantics : 'DataSubjectID';
emailAddress @PersonalData.IsPotentiallyPersonal;
firstName @PersonalData.IsPotentiallyPersonal;
lastName @PersonalData.IsPotentiallyPersonal;
creditCardNo @PersonalData.IsPotentiallySensitive;
dateOfBirth @PersonalData.IsPotentiallyPersonal;
}
annotate bookshop.CustomerPostalAddress with @PersonalData.DataSubjectRole: 'Customer';
annotate bookshop.CustomerPostalAddress with @PersonalData.EntitySemantics: 'DataSubjectDetails'
{
Customer @PersonalData.FieldSemantics: 'DataSubjectID';
street @PersonalData.IsPotentiallyPersonal;
town @PersonalData.IsPotentiallyPersonal;
country @PersonalData.IsPotentiallyPersonal;
}
annotate bookshop.CustomerPostalAddress with @PersonalData : {
DataSubjectRole : 'Customer',
EntitySemantics : 'DataSubjectDetails'
}
{
Customer @PersonalData.FieldSemantics : 'DataSubjectID';
street @PersonalData.IsPotentiallyPersonal;
town @PersonalData.IsPotentiallyPersonal;
country @PersonalData.IsPotentiallyPersonal;
}
// annotations for Personal Data Manager - Search Fields
annotate bookshop.Customers with @(Communication.Contact : {
n : {
surname: lastName,
given: firstName
},
bday: dateOfBirth
});
annotate bookshop.Customers with @(Communication.Contact : {
n : {
surname : lastName,
given : firstName
},
bday : dateOfBirth
});
// annotations for Audit Log
annotate bookshop.Customers with @AuditLog.Operation: {Read: true, Insert: true, Update: true, Delete: true};
annotate bookshop.Customers with @AuditLog.Operation : {
Read : true,
Insert : true,
Update : true,
Delete : true
};
annotate bookshop.CustomerPostalAddress with @AuditLog.Operation: {Read: true, Insert: true, Update: true, Delete: true};
annotate bookshop.CustomerPostalAddress with @AuditLog.Operation : {
Read : true,
Insert : true,
Update : true,
Delete : true
};