Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Mock function import of API_CV_ATTACHMENT_SRV
- Loading branch information
1 parent
c91088b
commit 8fa7725
Showing
6 changed files
with
1,253 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using {API_CV_ATTACHMENT_SRV as external} from './external/API_CV_ATTACHMENT_SRV.csn'; | ||
|
|
||
| service AttachmentContentService @(path : '/API_CV_ATTACHMENT_SRV') { | ||
| @cds.persistence.skip : false | ||
| @cds.persistence.table | ||
| entity AttachmentContentSet : external.AttachmentContentSet {} | ||
|
|
||
| @cds.persistence.skip : false | ||
| @cds.persistence.table | ||
| entity A_DocumentInfoRecordAttch : external.A_DocumentInfoRecordAttch { | ||
| DocumentInfoRecordToAttachmentNavigation : Association to many AttachmentContentSet | ||
| on DocumentInfoRecordDocType = DocumentInfoRecordToAttachmentNavigation.DocumentInfoRecordDocType | ||
| and DocumentInfoRecordDocNumber = DocumentInfoRecordToAttachmentNavigation.DocumentInfoRecordDocNumber | ||
| and DocumentInfoRecordDocVersion = DocumentInfoRecordToAttachmentNavigation.DocumentInfoRecordDocVersion | ||
| and DocumentInfoRecordDocPart = DocumentInfoRecordToAttachmentNavigation.DocumentInfoRecordDocPart; | ||
| } | ||
|
|
||
| function GetAttachmentCount(BusinessObjectTypeName : String, LinkedSAPObjectKey : String, SemanticObject : String) returns external.AttachmentsCount | ||
| }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| const cds = require("@sap/cds"); | ||
|
|
||
| module.exports = cds.service.impl((srv) => { | ||
| srv.on("GetAttachmentCount", async (req) => { | ||
| console.log(req.data); | ||
| return { AttachmentCount: 2 }; | ||
| }); | ||
| }); |
Oops, something went wrong.