* add read only tree table and value help
* rm tree table in catalogservice
* Update cat-service.cds
* i18n and object page
* hana workaround, local messaging and rm virtual
* move hierarchy to fiori
* Update admin-service.cds
* Update common.cds
* fix after moving to fiori
* fix UI filter
* file-based-messaging in hybrid
* review fixes
* Update services.cds
* make bookshop Books fiori.draft.enabled
* add simplest handler for sqlite
* adapt test and link in csvs
* .
* Reverting to human-readable UUIDs :)
* Less obstrusive workaround
* typo
* Update fiori/app/common.cds
* Update fiori/app/common.cds
* Workaround for stupid GUID check in Fiori client
* ...
* Simplified mock support for recursive hierarchies in SQLite :)
* missing comma
* Rudimentary tree support for Genres on SQLite
* ?.
* fixed copy error
* using subselect to determine leafs
* Revert "using subselect to determine leafs"
This reverts commit f01ddaea1f.
* Using scalar subselect for DrillState
* .
---------
Co-authored-by: D070615 <olena.timrova@sap.com>
Co-authored-by: D045778 <johannes.vogel@sap.com>
Co-authored-by: Daniel Hutzel <daniel.hutzel@sap.com>
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
using { Currency, managed, sap } from '@sap/cds/common';
|
|
namespace sap.capire.bookshop;
|
|
|
|
entity Books : managed {
|
|
key ID : Integer;
|
|
title : localized String(111) @mandatory;
|
|
descr : localized String(1111);
|
|
author : Association to Authors @mandatory;
|
|
genre : Association to Genres;
|
|
stock : Integer;
|
|
price : Price;
|
|
currency : Currency;
|
|
image : LargeBinary @Core.MediaType: 'image/png';
|
|
}
|
|
|
|
entity Authors : managed {
|
|
key ID : Integer;
|
|
name : String(111) @mandatory;
|
|
dateOfBirth : Date;
|
|
dateOfDeath : Date;
|
|
placeOfBirth : String;
|
|
placeOfDeath : String;
|
|
books : Association to many Books on books.author = $self;
|
|
}
|
|
|
|
/** Hierarchically organized Code List for Genres */
|
|
entity Genres : sap.common.CodeList {
|
|
key ID : UUID;
|
|
parent : Association to Genres;
|
|
children : Composition of many Genres on children.parent = $self;
|
|
}
|
|
|
|
type Price : Decimal(9,2);
|
|
|
|
|
|
// ------------------------------------------------------------------
|
|
// temporary workaround for reuse in fiori sample and hana deployment
|
|
annotate Books with @fiori.draft.enabled;
|