Data model

Lists, relationships, statuses, and the append-only rules of the Salon schema.

The schema has 58 lists in features/keystone/models. The source repo keeps a fuller map in docs/schema-map.md.

Rules

  • Money is integer cents.
  • Times are instants. Local time comes from Location.timezone.
  • Most business lists block generated create, update, and delete. They change through custom mutations that check the role, run in a serializable transaction, and take an idempotency key.
  • Revisions, transitions, reviews, ledger entries, reversals, and adjustments are append-only.

Core relationships

FromTo
UserRole, Client, Stylist
ServiceServiceCategory, Stylist (specialists), SalonResource (required)
StylistStylistSchedule, Location, Service
AppointmentClient, Stylist, Location, AppointmentLineItem, AppointmentSegment, AppointmentScheduleRevision, ConsultationSubmission
SalonTransactionAppointment, SalonTransactionLineItem, TransactionReversal
PaymentAppointment, PaymentSession, Commission, GratuityLedgerEntry
CommissionStylist, Service, Payment, CommissionAdjustment
ClientMembershipClient, Membership
ClientPackageClient, ServicePackage, ClientPackageUsage, ClientPackageAdjustment
GiftCardGiftCardTransaction
ClientPointsUser
ProductInventoryMovement

Status values

ListValues
Appointmentpending, confirmed, in_progress, completed, cancelled, no_show
AppointmentSegmentplanned, started, completed, skipped, superseded
WaitlistEntryactive, notified, converted, removed
SalonTransactionopen, completed, voided
Paymentpending, processing, completed, failed, refunded, partially_refunded
TransactionReversalposted, provider_pending
ClientMembershipactive, paused, cancelled
ClientPackageactive, expired, fully-used, cancelled
Referralpending, completed, expired
ConsultationSubmissionsubmitted, reviewed, needs_clarification, accepted_for_service, deferred
Stylistactive, on_leave, inactive
Serviceactive, inactive

Lists by area

  • Identity: User, Role
  • Catalog: ServiceCategory, Service, ServiceVariant, ServiceSegment, SalonImage, Product, InventoryMovement
  • People and capacity: Location, StoreSettings, Stylist, StylistSchedule, SalonResource
  • Clients and care: Client, ClientNote, ColorFormula, FormTemplate, ConsultationTemplateVersion, ConsultationSubmission, ConsultationReview, Review
  • Booking: Appointment, AppointmentLineItem, AppointmentScheduleRevision, AppointmentSegment, SegmentTransition, WaitlistEntry
  • Money: SalonTransaction, SalonTransactionLineItem, Payment, PaymentProvider, PaymentSession, PaymentWebhookEvent, TransactionReversal, TransactionReversalLine, Commission, CommissionAdjustment, GratuityLedgerEntry, DepositAdjustment
  • Benefits and loyalty: Membership, ClientMembership, ServicePackage, ClientPackage, ClientPackageUsage, ClientPackageAdjustment, GiftCard, GiftCardTransaction, LoyaltyProgram, ClientPoints, Referral
  • Messages and system: MessageTemplate, MessageLog, DomainEvent, WidgetConfiguration

On this page