Moved managed data annotations

This commit is contained in:
Daniel
2020-03-15 12:11:07 +01:00
parent eefdf6c976
commit e4983b8bde
2 changed files with 7 additions and 7 deletions

View File

@@ -29,3 +29,10 @@ entity Likes {
key review : Association to Reviews;
key user : User;
}
// Auto-fill reviewers and review dates
annotate Reviews with {
reviewer @cds.on.insert:$user;
date @cds.on.insert:$now;
date @cds.on.update:$now;
}

View File

@@ -16,13 +16,6 @@ service ReviewsService {
rating @mandatory @assert.enum;
}
// Auto-fill reviewers and review dates
annotate Reviews with {
reviewer @cds.on.insert:$user;
date @cds.on.insert:$now;
date @cds.on.update:$now;
}
}