-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.cds
22 lines (19 loc) · 841 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
namespace projectportfolio.db;
using { cuid, managed, sap.common.CodeList } from '@sap/cds/common';
entity Projects : cuid, managed {
name : String not null @title: '{i18n>name}';
startDate : Date not null @title: '{i18n>startDate}';
endDate : Date @title: '{i18n>endDate}';
description: String @title: '{i18n>description}';
customer : Association to Customers @title: '{i18n>customer}';
type : Association to ProjectTypes @title: '{i18n>type}';
}
entity Customers : cuid, managed {
name : String not null @title: '{i18n>name}';
industry : String @title: '{i18n>industry}';
country : String @title: '{i18n>country}';
projects : Association to many Projects on projects.customer = $self @title: '{i18n>projects}';
}
entity ProjectTypes : CodeList {
key code : String(10) @title: '{i18n>code}';
}