Skip to content

CalendarSlot Model

Bookable event type within a calendar (for example, a 15-minute consultation), with its configuration and availability rules. Internally referred to as a "slot" and stored in the fcal_calendar_events table.

Class

  • Source: fluent-booking/app/Models/CalendarSlot.php
  • Table: fcal_calendar_events
  • Primary key: id
  • Extends: Model

Attributes

ColumnTypeNullableDefaultDescription
idBIGINT(20) UNSIGNED NOT NULL PRIMARY KEYYesPrimary key for the row.
hashVARCHAR(192)YesRandom hash used as a public, non-enumerable booking identifier.
user_idBIGINT(20) UNSIGNEDNoWordPress user ID associated with the row.
calendar_idBIGINT(20) UNSIGNEDNoForeign key to fcal_calendars.
durationINT(11) UNSIGNEDNoEvent length in minutes.
titleVARCHAR(192)NoHuman-readable title stored for the record.
slugVARCHAR(192)NoSanitized slug or public identifier.
media_idBIGINT(20) UNSIGNEDYesForeign key to a related record.
descriptionLONGTEXTYesDescription text stored for the record.
settingsLONGTEXTYesSerialized settings payload.
availability_typeVARCHAR(192)YescustomAvailability Type stored for this record.
availability_idBIGINT(20) UNSIGNEDYesForeign key to a related record.
statusVARCHAR(20)NoactiveLifecycle status (scheduled, cancelled, completed, rejected, pending).
typeVARCHAR(20)NofreeSubtype discriminator.
color_schemaVARCHAR(100)NodefaultColor Schema stored for this record.
location_typeVARCHAR(100)No``Location Type stored for this record.
location_headingTEXTYesLocation Heading stored for this record.
location_settingsLONGTEXTYesLocation Settings stored for this record.
event_typeVARCHAR(20)Nosinglesingle or group event.
is_display_spotsBOOLEANNo0Is Display Spots stored for this record.
max_book_per_slotINT(10) UNSIGNEDNo1Max Book Per Slot stored for this record.
created_atTIMESTAMPYesCreation timestamp maintained by the ORM.
updated_atTIMESTAMPYesUpdate timestamp maintained by the ORM.

Relationships

MethodTypeTarget
calendar()belongsToCalendar
bookings()hasManyBooking
user()belongsToUser
event_metas()hasManyMeta

Public Methods (sample)

MethodSignature
setSettingsAttribute()$settings
getSettingsAttribute()$settings
setLocationSettingsAttribute()$locationSettings
getLocationSettingsAttribute()$locationSettings
getShortDescriptionAttribute()
calendar()
bookings()
user()
event_metas()
isOneToOne()
isGroup()
isSingleEvent()
isGroupEvent()
isRoundRobin()
isCollective()
isTeamEvent()
isOneOffEvent()
isMultiHostEvent()
isMultiHostsEvent()
isMultiGuestEvent()
isRecurringEvent()
isProEvent()
isMultiBooking()
allowMultiBooking()
multiBookingLimit()
getAuthorProfile()$public = true, $userID = null
getAuthorProfiles()$public = true
getRecurringConfig()
isLocationFieldRequired()
isPhoneRequired()