cleaned up
This commit is contained in:
17
orders/db/schema.cds
Normal file
17
orders/db/schema.cds
Normal file
@@ -0,0 +1,17 @@
|
||||
using { sap.capire.bookshop.Books } from '@capire/bookshop/db/schema';
|
||||
using { Currency, managed, cuid } from '@sap/cds/common';
|
||||
namespace sap.capire.bookshop;
|
||||
|
||||
entity Orders : cuid, managed {
|
||||
OrderNo : String @title:'Order Number'; //> readable key
|
||||
Items : Composition of many OrderItems on Items.parent = $self;
|
||||
total : Decimal(9,2) @readonly;
|
||||
currency : Currency;
|
||||
}
|
||||
|
||||
entity OrderItems : cuid {
|
||||
parent : Association to Orders;
|
||||
book : Association to Books;
|
||||
amount : Integer;
|
||||
netAmount : Decimal(9,2);
|
||||
}
|
||||
Reference in New Issue
Block a user