This commit is contained in:
Daniel
2021-07-16 07:09:19 +02:00
parent 67643b8d95
commit fc69311ebe
14 changed files with 89 additions and 3285 deletions

View File

@@ -0,0 +1,21 @@
using { cuid, managed, User, Currency } from '@sap/cds/common';
using { sap.capire.orders as my } from '../db/schema';
using { external.Products } from './external';
service OrdersService {
entity Orders : cuid, managed {
OrderNo : String @title:'Order Number'; //> readable key
Items : Composition of many {
key ID : UUID;
product : Association to Products;
amount : Integer;
title : String; //> intentionally replicated as snapshot from product.title
price : Double;
};
buyer : User;
currency : Currency;
}
}