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