generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace bookshop.service; | ||
|
||
using bookshop as my from './data-model'; | ||
|
||
service CatalogService { | ||
@odata.draft.enabled | ||
entity Books as projection on my.Books; | ||
entity Publishers as projection on my.Publishers; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace bookshop; | ||
|
||
type User : String(255); | ||
aspect cuid { key ID : UUID; } | ||
aspect managed { | ||
createdAt : Timestamp @cds.on.insert : $now; | ||
createdBy : User @cds.on.insert : $user; | ||
modifiedAt : Timestamp @cds.on.insert : $now @cds.on.update : $now; | ||
modifiedBy : User @cds.on.insert : $user @cds.on.update : $user; | ||
} | ||
|
||
entity Books : managed, cuid { | ||
title : String; | ||
publishers : Composition of many Publishers | ||
on publishers.book = $self; | ||
} | ||
|
||
entity Publishers : managed, cuid { | ||
name : String; | ||
book : Association to Books; | ||
} |