pdm annotations
This commit is contained in:
@@ -2,8 +2,10 @@
|
|||||||
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 : {
|
||||||
annotate bookshop.Customers with @PersonalData.EntitySemantics: 'DataSubject'
|
DataSubjectRole : 'Customer',
|
||||||
|
EntitySemantics : 'DataSubject'
|
||||||
|
}
|
||||||
{
|
{
|
||||||
ID @PersonalData.FieldSemantics : 'DataSubjectID';
|
ID @PersonalData.FieldSemantics : 'DataSubjectID';
|
||||||
emailAddress @PersonalData.IsPotentiallyPersonal;
|
emailAddress @PersonalData.IsPotentiallyPersonal;
|
||||||
@@ -13,8 +15,10 @@ 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 : {
|
||||||
annotate bookshop.CustomerPostalAddress with @PersonalData.EntitySemantics: 'DataSubjectDetails'
|
DataSubjectRole : 'Customer',
|
||||||
|
EntitySemantics : 'DataSubjectDetails'
|
||||||
|
}
|
||||||
{
|
{
|
||||||
Customer @PersonalData.FieldSemantics : 'DataSubjectID';
|
Customer @PersonalData.FieldSemantics : 'DataSubjectID';
|
||||||
street @PersonalData.IsPotentiallyPersonal;
|
street @PersonalData.IsPotentiallyPersonal;
|
||||||
@@ -32,6 +36,16 @@ annotate bookshop.Customers with @(Communication.Contact : {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// annotations for Audit Log
|
// 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
|
||||||
|
};
|
||||||
|
|||||||
@@ -4,29 +4,28 @@ using { sap.capire.bookshop.Books } from '@capire/bookshop';
|
|||||||
using {sap.capire.bookshop.Orders} from '@capire/orders';
|
using {sap.capire.bookshop.Orders} from '@capire/orders';
|
||||||
using {sap.capire.bookshop.OrderItems} from '@capire/orders';
|
using {sap.capire.bookshop.OrderItems} from '@capire/orders';
|
||||||
|
|
||||||
//@requires: 'system-user'
|
// @requires:'system-user' - todo - security check
|
||||||
service PDMService{
|
service PDMService{
|
||||||
|
|
||||||
entity Customers as projection on db.Customers;
|
entity Customers as projection on db.Customers;
|
||||||
|
|
||||||
entity CustomerPostalAddress as projection on db.CustomerPostalAddress;
|
entity CustomerPostalAddress as projection on db.CustomerPostalAddress;
|
||||||
|
|
||||||
// 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 {
|
||||||
{ 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,
|
||||||
Customer.email as Customer_Email,
|
Customer.email as Customer_Email,
|
||||||
Items.book.ID as Item_Book_ID,
|
Items.book.ID as Item_Book_ID,
|
||||||
Items.amount as Item_Amount,
|
Items.amount as Item_Amount,
|
||||||
Items.netAmount as Item_NetAmount};
|
Items.netAmount as Item_NetAmount
|
||||||
|
};
|
||||||
|
|
||||||
// annotate new view
|
// annotate new view
|
||||||
annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics: 'ContractRelated')
|
annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics : 'Other') {
|
||||||
{
|
Item_ID @PersonalData.FieldSemantics : 'ContractRelatedID';
|
||||||
Item_ID @PersonalData.FieldSemantics: 'LegalGroundID';
|
|
||||||
Customer_ID @PersonalData.FieldSemantics : 'DataSubjectID';
|
Customer_ID @PersonalData.FieldSemantics : 'DataSubjectID';
|
||||||
Customer_Email @PersonalData.IsPotentiallyPersonal;
|
Customer_Email @PersonalData.IsPotentiallyPersonal;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user