Open-Source Wikis

/

Cal.com

/

Reference

/

Data models

calcom/cal.com

Data models

The Prisma schema is packages/prisma/schema.prisma — a single 2,877-line file with 100 models and 46 enums. This page lists the most-referenced models grouped by area. For narrative coverage of the central ones, see primitives.

Booking core

  • EventType — the bookable offering (see primitives/eventtype)
  • Booking — a confirmed/pending reservation (see primitives/booking)
  • Attendee — non-organizer participants
  • BookingReference — third-party event identifiers per booking
  • BookingSeat — seat-based events
  • Payment — paid bookings
  • HashedLink — private booking links
  • CancellationReason — captured cancellation reasons
  • DenormalizedEventType — query-shape view (Prisma view)
  • AssignmentReason — why this host got the round-robin booking

Identity and access

  • User — see primitives/user
  • Account — NextAuth provider linkage
  • Session — NextAuth session
  • Profile — per-organization profile / username
  • Membership — team / organization membership (with role)
  • Team — teams and organizations (organizations are special teams)
  • VerificationToken — magic-link / verification tokens
  • ApiKey + OAuthClient + AccessCode + AccessToken + RefreshToken — Platform tenant auth

Scheduling

  • Schedule — see primitives/schedule
  • Availability — schedule rows
  • SelectedSlot — pending reservations
  • Host + HostGroup + HostLocation — team event-type assignments
  • TravelSchedule — temporary timezone overlay
  • OutOfOfficeEntry — vacation entries
  • Holiday — imported holiday entries
  • DateOverride (modeled as Availability rows with explicit date)

Calendars and integrations

  • Credential — encrypted third-party tokens (see primitives/credential)
  • DelegationCredential — system-wide delegation
  • SelectedCalendar — calendars to read from
  • DestinationCalendar — calendar to write to
  • CalendarCache — busy-time caching
  • App — installed app-store entry

Form-builder and event-type extras

  • EventTypeCustomInput — legacy custom inputs (newer flows use bookingFields JSON)
  • EventTypeAppMetadata — per-app per-event-type metadata
  • CalVideoSettings — per-event-type Cal Video settings (recording, transcription, ...)
  • VideoCallGuest — public guest entries on a video call

Workflows and notifications

  • Workflow + WorkflowReminder + WorkflowsOnEventTypes — workflow definitions (runtime being deprecated)
  • Webhook + WebhookScheduledTriggers — outbound webhooks
  • Notification — in-app notifications
  • NotificationsSubscription — push subscriptions

Tasking and audit

  • Task — backing table for the in-process tasker
  • BookingAudit — audit trail of booking transitions
  • Feature — feature-flag definitions
  • Feedback — collected feedback

Permissions (PBAC)

  • Permission + Role + RolePermission + MembershipRole — PBAC primitives
  • SQL helpers for PBAC live in packages/prisma/sql/

Watchlist and signup defenses

  • Watchlist — domain / email / IP risk lists
  • Blocklist — explicit deny-lists
  • Bot detection runtime is in code, not the schema

Enums (selected)

  • SchedulingTypeROUND_ROBIN, COLLECTIVE, MANAGED
  • PeriodTypeUNLIMITED, ROLLING, ROLLING_WINDOW, RANGE
  • BookingStatusACCEPTED, PENDING, CANCELLED, REJECTED, AWAITING_HOST
  • CreationSourceAPI_V1, API_V2, WEBAPP
  • IdentityProviderCAL, GOOGLE, GITHUB, ...
  • MembershipRole — owner / admin / member
  • WorkflowMethods, WorkflowTriggerEvents, WorkflowActions, WorkflowTemplates
  • CancellationReasonRequirement — mandatory / optional combinations
  • WebhookTriggerEvents — every event you can subscribe to
  • AppCategories — calendar / conferencing / payment / crm / analytics / automation / messaging / other
  • PaymentStatus, PaymentOption
  • RoleType

Reusable selects

packages/prisma/selects/ contains shared select snippets so the same shape can be reused across repositories.

Generated artifacts

  • packages/prisma/zod/ — one Zod schema per model
  • packages/kysely/types.ts — Kysely-compatible types
  • packages/prisma/generated/prisma — Prisma client
  • packages/prisma/enum-generator.ts outputs a runtime enums file

Regenerate with yarn workspace @calcom/prisma prisma generate.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Data models – Cal.com wiki | Factory