.
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
using { OrdersService, sap.capire.orders.OrderItems } from '../../srv/orders-service';
|
using { OrdersService } from '../../srv/orders-service';
|
||||||
|
|
||||||
|
|
||||||
@odata.draft.enabled
|
@odata.draft.enabled
|
||||||
@@ -68,7 +68,7 @@ annotate OrdersService.Orders with @(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
annotate OrderItems with @(
|
annotate OrdersService.Orders_Items with @(
|
||||||
UI: {
|
UI: {
|
||||||
LineItem: [
|
LineItem: [
|
||||||
{Value: product_ID, Label:'Product ID'},
|
{Value: product_ID, Label:'Product ID'},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
ID;order_ID;amount;product_ID;title;price
|
ID;up__ID;amount;product_ID;title;price
|
||||||
58040e66-1dcd-4ffb-ab10-fdce32028b79;7e2f2640-6866-4dcf-8f4d-3027aa831cad;1;201;Wuthering Heights;11.11
|
58040e66-1dcd-4ffb-ab10-fdce32028b79;7e2f2640-6866-4dcf-8f4d-3027aa831cad;1;201;Wuthering Heights;11.11
|
||||||
64e718c9-ff99-47f1-8ca3-950c850777d4;7e2f2640-6866-4dcf-8f4d-3027aa831cad;1;271;Catweazle;15
|
64e718c9-ff99-47f1-8ca3-950c850777d4;7e2f2640-6866-4dcf-8f4d-3027aa831cad;1;271;Catweazle;15
|
||||||
e9641166-e050-4261-bfee-d1e797e6cb7f;64e718c9-ff99-47f1-8ca3-950c850777d4;2;252;Eleonora;28
|
e9641166-e050-4261-bfee-d1e797e6cb7f;64e718c9-ff99-47f1-8ca3-950c850777d4;2;252;Eleonora;28
|
||||||
|
@@ -4,21 +4,18 @@ namespace sap.capire.orders;
|
|||||||
|
|
||||||
entity Orders : cuid, managed {
|
entity Orders : cuid, managed {
|
||||||
OrderNo : String @title:'Order Number'; //> readable key
|
OrderNo : String @title:'Order Number'; //> readable key
|
||||||
Items : Composition of many OrderItems on Items.order = $self;
|
Items : Composition of many {
|
||||||
|
key ID : UUID;
|
||||||
|
@assert.integrity:false // REVISIT: this is a temporary workaround for a glitch in cds-runtime
|
||||||
|
product : Association to Products;
|
||||||
|
amount : Integer;
|
||||||
|
title : String;
|
||||||
|
price : Double;
|
||||||
|
};
|
||||||
buyer : User;
|
buyer : User;
|
||||||
currency : Currency;
|
currency : Currency;
|
||||||
}
|
}
|
||||||
|
|
||||||
entity OrderItems {
|
|
||||||
key ID : UUID;
|
|
||||||
order : Association to Orders;
|
|
||||||
@assert.integrity:false // REVISIT: this is a temporary workaround for a glitch in cds-runtime
|
|
||||||
product : Association to Products;
|
|
||||||
amount : Integer;
|
|
||||||
title : String;
|
|
||||||
price : Double;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** This is a stand-in for arbitrary ordered Products */
|
/** This is a stand-in for arbitrary ordered Products */
|
||||||
@cds.persistence.skip:'always'
|
@cds.persistence.skip:'always'
|
||||||
entity Products {
|
entity Products {
|
||||||
|
|||||||
Reference in New Issue
Block a user