forked from SAP-samples/btp-industry-use-cases
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.cds
36 lines (31 loc) · 957 Bytes
/
schema.cds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using {cuid} from '@sap/cds/common';
namespace wpm.db;
entity Workspace {
key irn : String(80);
shortName : String(20);
longName : String(100);
type : String(15);
workPlaces : Composition of many Workplace
on workPlaces.space = $self;
}
entity Workplace {
key irn : String(80);
space : Association to Workspace;
space_name : String(100);
name : String(50);
bookings : Composition of many Booking
on bookings.place = $self;
}
@readonly
entity WorkspaceType {
key type : String(15);
};
entity Booking : cuid {
fromDateTime : DateTime;
toDateTime : DateTime;
userId : String(150);
space : Association to Workspace;
place : Association to Workplace;
virtual deletable : Boolean default false;
virtual updateHidden : Boolean default true;
};