Domain event emitted when an article is created.
Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.
const event = new ArticleCreatedEvent({ title: "New Article", url: "https://example.com", quote: "Important quote", categoryName: "Technology", userId: "user-123", caller: "addArticle",});// event.eventType === "article.created"await eventHandler.handle(event); Copy
const event = new ArticleCreatedEvent({ title: "New Article", url: "https://example.com", quote: "Important quote", categoryName: "Technology", userId: "user-123", caller: "addArticle",});// event.eventType === "article.created"await eventHandler.handle(event);
Creates a new ArticleCreatedEvent.
Event data containing article details and metadata
The function/method that triggered the event
The category name
Quote/excerpt from the article
The article title
The article URL
The user who created the article
Readonly
The type of event (e.g., "article.created")
Contextual information about the event
Event-specific data
Domain event emitted when an article is created.
Remarks
Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.
Example
See