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

View File

@@ -1,24 +1,14 @@
// Proxy for importing schema from bookshop sample
using from '@capire/bookshop';
using { Currency, managed, cuid } from '@sap/cds/common';
using { sap.capire.bookshop.Books } from '@capire/bookshop';
using { sap.capire.bookshop.Orders } from '@capire/orders';
using { sap.capire.bookshop.OrderItems } from '@capire/orders';
using { Currency, managed, cuid } from '@sap/cds/common';
namespace sap.capire.bookshop;
entity Orders : managed {
key ID : cds.UUID;
OrderNo : String @title:'Order Number'; //> readable key
Customer : Association to Customers;
Items : Composition of many OrderItems on Items.parent = $self;
total : Decimal(9,2) @readonly;
currency : Currency;
}
entity OrderItems {
key ID : cds.UUID;
parent : Association to Orders not null;
book : Association to bookshop.Books;
amount : Integer;
netAmount: Decimal(9,2);
}
extend Orders with {
Customer : Association to Customers;
}
entity Customers : managed {
key ID : UUID;