pdm service

This commit is contained in:
Wolfgang Koch
2020-10-15 14:15:51 +02:00
parent bde5cd9818
commit 8575b75edb
8 changed files with 52 additions and 25 deletions

33
gdpr/srv/pdm-service.cds Normal file
View File

@@ -0,0 +1,33 @@
//using from '@capire/orders';
using { sap.capire.bookshop as db } from '../db/schema';
using { sap.capire.bookshop.Books } from '@capire/bookshop';
using { sap.capire.bookshop.Orders } from '@capire/orders';
using { sap.capire.bookshop.OrderItems } from '@capire/orders';
//@requires: 'system-user'
service PDM_Service {
entity Customers as projection on db.Customers;
entity OrderItemView as
SELECT from Orders
{ //key ID,
//key Items.ID as Item_ID,
OrderNo,
Customer.ID as Customer_ID,
Customer.Email as Customer_Email,
Items.book.ID as Item_Book_ID,
Items.amount as Item_Amount,
Items.netAmount as Item_NetAmount};
};
annotate PDM_Service.Customers with @(
PersonalData.EntitySemantics: 'DataSubject'
)
{
ID @PersonalData.FieldSemantics: 'DataSubjectID';
FirstName @PersonalData.IsPotentiallyPersonal;
LastName @PersonalData.IsPotentiallyPersonal;
CreditCardNo @PersonalData.IsPotentiallyPersonal;
dateOfBirth @PersonalData.IsPotentiallyPersonal;
};