calcom/cal.com
EventType
The bookable offering. Defined by the EventType Prisma model in packages/prisma/schema.prisma. Almost every read path in Cal.diy starts with loading an EventType.
Schema highlights
id(autoincrement)title,slug,description,interfaceLanguagelength(minutes),offsetStarthidden,position,eventName,bookingFields(JSON)locations(JSON of allowed location types — Zoom, Google Meet, in-person, ...)periodTypeenum (UNLIMITED,ROLLING,ROLLING_WINDOW,RANGE)periodStartDate,periodEndDate,periodCountCalendarDays,periodDaysrequiresConfirmation,requiresBookerEmailVerification,disableGuests,disableCancelling,disableReschedulinghideCalendarNotes,hideOrganizerEmailcancellationReasonRequirementenumminimumBookingNotice,beforeEventBuffer,afterEventBufferbookingLimits,durationLimits,intervalLimits(JSON)seatsPerTimeSlot,seatsShowAttendees,seatsShowAvailabilityCountmetadata(JSON)parentIdself-relation — managed event typesuserId(owner) and / orteamId(team event type)profileId— links to the Profile model (organization profile)schedulingTypeenum —ROUND_ROBIN,COLLECTIVE,MANAGED- Relations:
hosts,bookings,availability,webhooks,destinationCalendar,customInputs,hashedLink,recurringEvent
Where it lives in code
| Concern | File |
|---|---|
| Domain | packages/features/eventtypes/ |
| Repository interface | packages/features/eventtypes/eventtypes.repository.interface.ts |
| Editor UI | apps/web/modules/event-types/, apps/web/app/(use-page-wrapper)/(main-nav)/event-types/ |
| Booking-time loader | packages/features/bookings/lib/handleNewBooking/getEventType.ts, getEventTypesFromDB.ts |
| Booking fields builder | packages/features/bookings/lib/getBookingFields.ts |
| Locations metadata | packages/app-store/locations.ts |
Important behaviors
- Managed event types — a parent EventType propagates fields to children (one per team member). Children share the parent's slug under each team-member's profile.
- Booking fields — JSON column stored as a typed Zod array; rendered by the form-builder package. Defaults include name + email; organizers add custom inputs (single-line, paragraph, select, multi-select, phone, ...).
- Period rules — control how far in advance bookings are allowed. Implemented by
packages/lib/isOutOfBounds.tsx. - Seats —
seatsPerTimeSlot > 0activates the seat-based flow handled bypackages/features/bookings/lib/handleSeats/.
Consumers
Every feature page in this wiki ends up reading the EventType. The biggest readers:
- Bookings — the entire pipeline starts from a loaded EventType
- Slots and scheduling — slot generation reads period rules and limits
- Calendars — destination calendar resolution starts here
- Event types feature page — the editor
Related pages
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.