Files
cloud-cap-samples/bookshop/db/schema.cds
René Jeglinsky 7ce20182c8 Update schema.cds
typo
2020-03-17 09:20:10 +01:00

31 lines
800 B
Plaintext

namespace sap.capire.bookshop;
using { Currency, managed, sap } from '@sap/cds/common';
// using { Currency, managed, sap } from '@capire/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;
}
entity Authors : managed {
key ID : Integer;
name : String(111);
dateOfBirth : Date;
dateOfDeath : Date;
placeOfBirth : String;
placeOfDeath : String;
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;
}