more
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
using {sap.capire.bookshop as db} from '../db/data-privacy';
|
||||
using {sap.capire.orders as dbo} from '../db/data-privacy';
|
||||
using {sap.capire.auditLog as log} from '../db/AuditLogStore.cds';
|
||||
using {sap.capire.bookshop as db} from '../db/data-privacy';
|
||||
using {sap.capire.orders as dbo} from '../db/data-privacy';
|
||||
using {sap.capire.auditLog as log} from '../db/AuditLogStore.cds';
|
||||
|
||||
//@requires: 'PersonalDataManagerUser' // security check
|
||||
service LogService {
|
||||
|
||||
entity Customers as projection on db.Customers;
|
||||
entity CustomerPostalAddress as projection on db.CustomerPostalAddress;
|
||||
entity Orders as projection on dbo.Orders;
|
||||
entity Customers as projection on db.Customers;
|
||||
entity Addresses as projection on db.Addresses;
|
||||
entity Orders as projection on dbo.Orders;
|
||||
entity AuditLogStore as projection on log.AuditLogStore;
|
||||
|
||||
entity AuditLogStore as projection on log.AuditLogStore;
|
||||
|
||||
};
|
||||
|
||||
@@ -1,44 +1,43 @@
|
||||
using {sap.capire.bookshop as db} from '../db/data-privacy';
|
||||
using {sap.capire.bookshop.Books} from '../db/data-privacy';
|
||||
using {sap.capire.orders.Orders} from '../db/data-privacy';
|
||||
using {sap.capire.orders.OrderItems} from '../db/data-privacy';
|
||||
using {sap.capire.bookshop as db} from '../db/data-privacy';
|
||||
using {sap.capire.bookshop.Books} from '../db/data-privacy';
|
||||
using {sap.capire.orders.Orders} from '../db/data-privacy';
|
||||
using {sap.capire.orders.OrderItems} from '../db/data-privacy';
|
||||
|
||||
//@requires: 'PersonalDataManagerUser' // security check
|
||||
service PDMService {
|
||||
|
||||
entity Customers as projection on db.Customers;
|
||||
entity CustomerPostalAddress as projection on db.CustomerPostalAddress;
|
||||
entity CustomerBillingData as projection on db.CustomerBillingData;
|
||||
// Data Privacy annotations on 'Customers', 'Addresses', and 'BillingData' are derived from original entity definitions
|
||||
entity Customers as projection on db.Customers;
|
||||
entity Addresses as projection on db.Addresses;
|
||||
entity BillingData as projection on db.BillingData;
|
||||
|
||||
// create view on Orders and Items as flat projection
|
||||
entity OrderItemView as
|
||||
entity OrderItemView as
|
||||
select from Orders {
|
||||
ID,
|
||||
key Items.ID as Item_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
|
||||
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 new view
|
||||
annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics : 'Other') {
|
||||
Item_ID @PersonalData.FieldSemantics : 'ContractRelatedID';
|
||||
Customer_ID @PersonalData.FieldSemantics : 'DataSubjectID';
|
||||
Customer_Email @PersonalData.IsPotentiallyPersonal;
|
||||
annotate PDMService.OrderItemView with @(PersonalData.EntitySemantics: 'Other') {
|
||||
item_ID @PersonalData.FieldSemantics: 'ContractRelatedID';
|
||||
customer_ID @PersonalData.FieldSemantics: 'DataSubjectID';
|
||||
customer_email @PersonalData.IsPotentiallyPersonal;
|
||||
};
|
||||
|
||||
// annotations for Personal Data Manager - Search Fields
|
||||
annotate Customers with @(Communication.Contact : {
|
||||
n : {
|
||||
surname : lastName,
|
||||
given : firstName
|
||||
annotate Customers with @(Communication.Contact: {
|
||||
n : {
|
||||
surname: lastName,
|
||||
given : firstName
|
||||
},
|
||||
bday : dateOfBirth
|
||||
bday: dateOfBirth
|
||||
});
|
||||
|
||||
// Data Privacy annotations on 'Customers' and 'CustomerPostalAddress' are derived from original entity definitions
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user