add getMyTracks option

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-10-13 11:23:00 +03:00
committed by Daniel Hutzel
parent 99d4da34d7
commit a917dac1b2
5 changed files with 29 additions and 58 deletions

View File

@@ -1,24 +1,10 @@
using {sap.capire.media.store as my} from '../db/schema';
@cds.query.limit : {
default : 12,
max : 100
}
@(requires : ['identified-user'])
service BrowseTracks {
@readonly
entity Tracks as projection on my.Tracks;
@(requires : ['authenticated-user'])
function getInvoicedTracks() returns array of {
ID : Tracks.ID;
trackName : Tracks.name;
genreName : my.Genres.name;
composer : Tracks.composer;
unitPrice : Tracks.unitPrice;
albumTitle : my.Albums.title;
};
@readonly
entity Genres as projection on my.Genres;
}