...
This commit is contained in:
16
bookshop/db/data/sap.capire.bookshop-Genres.csv
Normal file
16
bookshop/db/data/sap.capire.bookshop-Genres.csv
Normal file
@@ -0,0 +1,16 @@
|
||||
ID;parent_ID;name
|
||||
10;;Fiction
|
||||
11;10;Drama
|
||||
12;10;Poetry
|
||||
13;10;Fantasy
|
||||
14;10;Science Fiction
|
||||
15;10;Romance
|
||||
16;10;Mystery
|
||||
17;10;Thriller
|
||||
18;10;Dystopia
|
||||
19;10;Fairy Tale
|
||||
20;;Non-Fiction
|
||||
21;20;Biography
|
||||
22;20;Autobiography
|
||||
23;20;Essay
|
||||
24;20;Speech
|
||||
|
@@ -1,11 +1,12 @@
|
||||
namespace sap.capire.bookshop;
|
||||
using { Currency, managed, cuid } from '@sap/cds/common';
|
||||
using { Currency, managed, cuid, sap } from '@sap/cds/common';
|
||||
|
||||
entity Books : managed {
|
||||
key ID : Integer;
|
||||
title : localized String(111);
|
||||
descr : localized String(1111);
|
||||
author : Association to Authors;
|
||||
genre : Association to Genres;
|
||||
stock : Integer;
|
||||
price : Decimal(9,2);
|
||||
currency : Currency;
|
||||
@@ -21,6 +22,12 @@ entity Authors : managed {
|
||||
books : Association to many Books on books.author = $self;
|
||||
}
|
||||
|
||||
entity Genres : sap.common.CodeList {
|
||||
key ID : Integer;
|
||||
parent : Association to Genres;
|
||||
children : Composition of many Genres on children.parent = $self;
|
||||
}
|
||||
|
||||
entity Orders : cuid, managed {
|
||||
OrderNo : String @title:'Order Number'; //> readable key
|
||||
Items : Composition of many OrderItems on Items.parent = $self;
|
||||
|
||||
Reference in New Issue
Block a user