-
Notifications
You must be signed in to change notification settings - Fork 10
/
annotations.cds
44 lines (43 loc) · 1.95 KB
/
annotations.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
37
38
39
40
41
42
43
44
using test.MainService from '../../srv/main';
annotate MainService.Header with @(
UI: {
Identification: [
{ Value: name },
],
SelectionFields: [ name, currency, country ],
LineItem: [
{ $Type: 'UI.DataField', Value: name, Label: 'Name' },
{ $Type: 'UI.DataField', Value: price, Label: 'Price' },
{ $Type: 'UI.DataField', Value: currency, Label: 'Currency' },
{ $Type: 'UI.DataField', Value: stock, Label: 'Stock' },
{ $Type: 'UI.DataField', Value: country, Label: 'Country' },
{ $Type: 'UI.DataField', Value: date, Label: 'Date' },
{ $Type: 'UI.DataField', Value: dateTime, Label: 'Date Time' },
{ $Type: 'UI.DataField', Value: time, Label: 'Time' },
{ $Type: 'UI.DataField', Value: timestamp, Label: 'Timestamp' },
],
HeaderInfo: {
$Type: 'UI.HeaderInfoType',
TypeName: 'Header',
TypeNamePlural: 'Headers',
Title: { Value: name },
Description: { Value: description }
},
Facets: [
{ $Type: 'UI.ReferenceFacet', Label: 'General', Target: '@UI.FieldGroup#General' },
],
FieldGroup#General: {
Data: [
{ $Type: 'UI.DataField', Value: name, Label: 'Name' },
{ $Type: 'UI.DataField', Value: price, Label: 'Price' },
{ $Type: 'UI.DataField', Value: currency, Label: 'Currency' },
{ $Type: 'UI.DataField', Value: stock, Label: 'Stock' },
{ $Type: 'UI.DataField', Value: country, Label: 'Country' },
{ $Type: 'UI.DataField', Value: date, Label: 'Date' },
{ $Type: 'UI.DataField', Value: dateTime, Label: 'Date Time' },
{ $Type: 'UI.DataField', Value: time, Label: 'Time' },
{ $Type: 'UI.DataField', Value: timestamp, Label: 'Timestamp' },
]
}
}
);