Improved reviews-service
This commit is contained in:
@@ -1,13 +1,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:Reviews.ID); // TODO: can be a bound action in OData
|
||||
action unlike (review:Reviews.ID); // TODO: can be a bound action in OData
|
||||
action like (review: type of Reviews:ID);
|
||||
action unlike (review: type of Reviews:ID);
|
||||
|
||||
// Async API
|
||||
event reviewed : { subject: Reviews.subject; rating: Decimal(2,1) };
|
||||
event reviewed : {
|
||||
subject: type of Reviews:subject;
|
||||
rating: Decimal(2,1)
|
||||
};
|
||||
|
||||
// Input validation
|
||||
annotate Reviews with {
|
||||
|
||||
Reference in New Issue
Block a user