In this video, we focus on creating and implementing the business logic for an equity management service. This involves setting up event types and handling specific business events like capitalizations, share releases, share splits, and share purchases.
We will create a service named Equity Management
. This service will handle the core business events and logic for managing equity.
Inside the EquityManagement.ts
, we will define four main events that will be used in our equity management system.
For better clarity and understanding, we define several types that will be used throughout our service.
This is a generic type that includes an ID and data field for all events.
These are the specific event types we will handle in our service.
Specific payloads sent from any event provider or even internally within our express routes.
A generic type that consists of all our payloads.
To handle the capitalization event, we need to ensure that we have the necessary information like the company ID and the capitalization payload.