Baseleg Docs

Training

Status: v1 lite — scaffolded, not a primary v1 delivery focus
Packages: packages/domain/training, packages/application/training

Purpose

The Training context records training activity for students: lessons, actual flights, and endorsements. It is the source of truth for a student’s training history and progression.

In v1, Training is intentionally shallow — basic lesson and flight recording is supported, but full syllabus management, training pathway tracking, and instructor sign-off workflows come later.

Key entities

Lesson (aggregate root)

A discrete training event, either ground-based or airborne.

Key attributes:

  • id — unique identifier
  • studentId — the student receiving instruction (MemberId)
  • instructorId — the instructor delivering the lesson (MemberId)
  • bookingId — optional link to a Scheduling Booking (BookingId | null)
  • typeground | flight
  • notes — instructor notes or objectives
  • conductedAt — date and time of the lesson

Flight (value object or entity)

An actual flown event. A Flight may be logged independently of a Lesson or linked to one.

Key attributes:

  • id — unique identifier
  • memberId — the member who flew (MemberId)
  • aircraftId — the aircraft flown (AircraftId)
  • bookingId — optional link to a Booking (BookingId | null)
  • lessonId — optional link to a Lesson
  • duration — flight time in minutes
  • departedAt — departure timestamp
  • arrivedAt — arrival timestamp

Endorsement

A formal record of an Instructor certifying a Student as competent for a specific operation.

Key attributes:

  • id — unique identifier
  • studentId — the endorsed student (MemberId)
  • instructorId — the endorsing instructor (MemberId)
  • type — the endorsement type (e.g. solo, cross-country, night)
  • issuedAt — date the endorsement was granted

Domain rules

  1. A Lesson must reference a valid Student and Instructor.
  2. An Endorsement must be issued by an authorised Instructor.
  3. A Student cannot receive an Endorsement for an operation they have not completed the prerequisite training for (enforcement detail: v2+).

Cross-context relationships

ContextUsage
PeopleReferences MemberId for student and instructor
SchedulingOptionally references BookingId to link a lesson to a booking
ComplianceEndorsements may affect currency requirements (v2+)