subscribe(domainEvents) {
        domainEvents.subscribe(MemberCreatedEvent, async (event) => {
            let attribution = event.data.attribution;

            await this.models.MemberCreatedEvent.add({
                member_id: event.data.memberId,
                created_at: event.timestamp,
                attribution_id: attribution?.id ?? null,
                attribution_url: attribution?.url ?? null,
                attribution_type: attribution?.type ?? null,
                source: event.data.source,
                referrer_source: attribution?.referrerSource ?? null,
                referrer_medium: attribution?.referrerMedium ?? null,
                referrer_url: attribution?.referrerUrl ?? null,
                batch_id: event.data.batchId ?? null
            });
        });

        domainEvents.subscribe(SubscriptionCreatedEvent, async (event) => {
            let attribution = event.data.attribution;

            await this.models.SubscriptionCreatedEvent.add({
                member_id: event.data.memberId,
                subscription_id: event.data.subscriptionId,
                created_at: event.timestamp,
                attribution_id: attribution?.id ?? null,
                attribution_url: attribution?.url ?? null,
                attribution_type: attribution?.type ?? null,
                referrer_source: attribution?.referrerSource ?? null,
                referrer_medium: attribution?.referrerMedium ?? null,
                referrer_url: attribution?.referrerUrl ?? null,
                batch_id: event.data.batchId ?? null
            });
        });
    }
Subscribe to events of this domainEvents service
@param {Object} domainEvents The DomainEvents service