Exploring More Domain Structures

Learn about detailed domain architectures, including aggregates, entities, events, and event handlers, for various domains within the application.

Scheduling

The scheduling domain deals with adding, updating, or removing scheduled maintenance events. These changes in schedule status are triggered primarily from the maintenance domain but can be triggered from the equipment domain as well in the case of a jammed turnstile.

Press + to interact
The domain architecture for the scheduling domain
The domain architecture for the scheduling domain

The scheduling domain is split into the object types shown in the preceding illusration, which are responsible for scheduling maintenance activities. Let’s take a closer look.

Aggregates

The scheduling domain has two aggregate roots that manage scheduling maintenance activities. One is CameraMaintenceSchedule, which deals with any maintenance schedule records related to camera equipment. The other is TurnstileMaintenanceSchedule, which deals with any maintenance schedule records related to turnstiles.

Entities

There’s only one domain entity that the scheduling domain deals directly with, and that is the WorkOrder entity. WorkOrder is a domain entity that contains information about a specific work order related to a maintenance schedule. It can apply to any type of equipment and captures when the work order was created, when it was assigned, and when it was completed.

Events

There are a total of six events in the domain, split across the two aggregates evenly. There are create, change, and remove events for turnstiles as well as cameras.

Event handlers

Three event handlers exist within the domain, ...