Data model

Lists by area and how they fit together.

Lists

Models registered in features/keystone/models/index.ts:

AreaModels
Tenant and peopleOrganization, User, Role, Member, MemberImportRecord, ContactMessage
Settings and sitesGymSettings, Location, GymResource
MembershipsMembershipTier, Membership, MembershipCreditGrant, MembershipCreditEntry, Subscription
ClassesClassType, ClassSchedule, ClassInstance, ClassBooking, Waitlist, AttendanceRecord, Instructor
Check-inCheckIn
Personal trainingTrainerAvailability, TrainerAppointment, TrainingPackage, TrainingCreditEntry, CoachingAssignment, TrainingLead
WorkoutsExercise, WorkoutLog, WorkoutSet
PaymentsMembershipPayment, GymPayment, PaymentMethod, PaymentProvider, PaymentSession, PaymentEvent, MembershipBillingAttempt, GymRefundAttempt, CounterPaymentAttempt
RetailRetailItem, RetailSale, RetailReturn, RetailStockEntry, RetailClose
OperationsOperationalNotice, ParticipationPolicy, ParticipationEvidence, OperationsCase, IntegrationCredential
SystemOnboardingRun, StaffIntent, AuthRateLimitBucket

Some notes on how they fit:

  • Class booking works on dated ClassInstance rows. Each booking is confirmed, waitlist, or cancelled. The separate Waitlist model is an older schedule-level list; live booking uses the per-session waitlist on ClassBooking.
  • Class credits come from a MembershipCreditGrant per service period, with every change in MembershipCreditEntry.
  • Training packages hold prepaid credits. Each use, refund, or adjustment is a TrainingCreditEntry.
  • StaffIntent stores the exact form request a person submitted, so a lost response can be retried without applying it twice.
  • CounterPaymentAttempt records a counter card sale or refund before Stripe is called.

On this page