Repository navigation
Expand file tree
/
Copy pathadmin-service.cds
More file actions
60 lines (50 loc) · 2.8 KB
/
Copy pathadmin-service.cds
File metadata and controls
60 lines (50 loc) · 2.8 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using {sap.capire.bookshop as my} from '../db/schema';
service AdminService @(requires: ['admin','system-user']) {
entity Books as projection on my.Books;
entity Authors as projection on my.Authors;
entity Books.attachments as projection on my.Books.attachments
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
@(Common.SideEffects : {TargetEntities: ['']},)
action createLink(
in:many $self,
@mandatory @Common.Label:'Name' name: String @UI.Placeholder: 'Enter a name for the link',
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Example: https://www.example.com'
);
action editLink(
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Example: https://www.example.com'
);
action openAttachment() returns String;
}
entity Books.references as projection on my.Books.references
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
@(Common.SideEffects : {TargetEntities: ['']},)
action createLink(
in:many $self,
@mandatory @Common.Label:'Name' name: String @UI.Placeholder: 'Enter a name for the link',
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Example: https://www.example.com'
);
action editLink(
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Example: https://www.example.com'
);
action openAttachment() returns String;
}
entity Books.footnotes as projection on my.Books.footnotes
actions {
@(Common.SideEffects : {TargetEntities: ['']},)
action copyAttachments(in:many $self, up__ID:String, objectIds:String);
@(Common.SideEffects : {TargetEntities: ['']},)
action createLink(
in:many $self,
@mandatory @Common.Label:'Name' name: String @UI.Placeholder: 'Enter a name for the link',
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Example: https://www.example.com'
);
action editLink(
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Example: https://www.example.com'
);
action openAttachment() returns String;
}
}