Skip to content

Commit

Permalink
missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Aug 1, 2019
1 parent 5cc96ed commit bf1fbbe
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
@@ -0,0 +1,14 @@
// if exports is an array, it will be the same like loading multiple files...
module.exports = require('../../../../../../index').defineViewBuilder({
//module.exports = require('cqrs-eventdenormalizer').defineViewBuilder({
name: 'blockedEmail', // optional, default is file name without extension, if name is '' it will handle all events that matches
aggregate: 'person', // optional
context: 'hr', // optional
version: 0, // optional, default is 0
payload: 'payload' // optional, if not defined it will pass the whole event...
}, function (data, vm) {
vm.set('blocked', true);
}).useAsQuery(function (evt) {
return { email: evt.payload.email };
});

@@ -0,0 +1,12 @@
// if exports is an array, it will be the same like loading multiple files...
module.exports = require('../../../../../../index').defineViewBuilder({
//module.exports = require('cqrs-eventdenormalizer').defineViewBuilder({
name: 'exitedPerson', // optional, default is file name without extension, if name is '' it will handle all events that matches
aggregate: 'person', // optional
context: 'hr', // optional
version: 0, // optional, default is 0
id: 'aggregate.id', // if not defined or not found it will generate a new viewmodel with new id
payload: 'payload', // optional, if not defined it will pass the whole event...
priority: 20 // optional, default Infinity
}, 'delete');

0 comments on commit bf1fbbe

Please sign in to comment.