Repository navigation
Expand file tree
/
Copy pathadmin-service.cds
More file actions
53 lines (44 loc) · 2.13 KB
/
Copy pathadmin-service.cds
File metadata and controls
53 lines (44 loc) · 2.13 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
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 name',
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Enter URL'
);
action editLink(url:String);
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 name',
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Enter URL'
);
action editLink(url:String);
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 name',
@mandatory @assert.format:'^(https?:\/\/)(([a-zA-Z0-9\-]+\.)+[a-zA-Z]{2,}|localhost)(:\d{2,5})?(\/[^\s]*)?$' @Common.Label:'URL' url: String @UI.Placeholder: 'Enter URL'
);
action editLink(url:String);
action openAttachment() returns String;
}
}