Updated to use srv-to-srv + declared events

This commit is contained in:
Daniel
2020-10-28 15:14:34 +01:00
committed by Daniel Hutzel
parent d9a06d16f1
commit df55110b9b
4 changed files with 15 additions and 14 deletions

View File

@@ -2,10 +2,17 @@ using { sap.capire.reviews as my } from '../db/schema';
service ReviewsService {
// Sync API
entity Reviews as projection on my.Reviews excluding { likes }
action like (review: type of Reviews:ID);
action unlike (review: type of Reviews:ID);
// Async API
event reviewed : {
subject: type of Reviews:subject;
rating: Decimal(2,1)
}
// Input validation
annotate Reviews with {
subject @mandatory;