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 KEYYes—Primary key for the row.
hashVARCHAR(192)Yes—Random hash used as a public, non-enumerable booking identifier.
user_idBIGINT(20) UNSIGNEDNo—WordPress user ID associated with the row.
calendar_idBIGINT(20) UNSIGNEDNo—Foreign key to fcal_calendars.
durationINT(11) UNSIGNEDNo—Event length in minutes.
titleVARCHAR(192)No—Human-readable title stored for the record.
slugVARCHAR(192)No—Sanitized slug or public identifier.
media_idBIGINT(20) UNSIGNEDYes—Foreign key to a related record.
descriptionLONGTEXTYes—Description text stored for the record.
settingsLONGTEXTYes—Serialized settings payload.
availability_typeVARCHAR(192)YescustomAvailability Type stored for this record.
availability_idBIGINT(20) UNSIGNEDYes—Foreign 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_headingTEXTYes—Location Heading stored for this record.
location_settingsLONGTEXTYes—Location 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_atTIMESTAMPYes—Creation timestamp maintained by the ORM.
updated_atTIMESTAMPYes—Update timestamp maintained by the ORM.

Relationships ​

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

Public Methods ​

MethodSignature
setSettingsAttribute()$settings
getSettingsAttribute()$settings
setLocationSettingsAttribute()$locationSettings
getLocationSettingsAttribute()$locationSettings
getShortDescriptionAttribute()—
calendar()—
bookings()—
user()—
event_metas()—
isOneToOne()—
isGroup()—
isSingleEvent()—
isGroupEvent()—
getEventTypes()—
isRoundRobin()—
isCollective()—
isTeamEvent()—
isOneOffEvent()—
isMultiHostEvent()—
isMultiHostsEvent()—
isMultiGuestEvent()—
isRecurringEvent()—
isProEvent()—
isMultiBooking()—
allowMultiBooking()—
multiBookingLimit()—
getAuthorProfile()$public = true, $userID = null
getAuthorProfiles()$public = true
getRecurringConfig()—
isLocationFieldRequired()—
isPhoneRequired()—
isAddressRequired()—
isGuestFieldRequired()—
getEventDefaultData()$calendar
getEventSchema()$calendar
getSlotSettingsSchema()$calendarId = null
getNotifications()$isEdit = false
setNotifications()$notifications
getBookingFields()—
setBookingFields()$bookingFields
getScheduleTimezone()$hostId = null
isMultiDurationEnabled()—
getDuration()$duration = null
getDefaultDuration()—
getAvailableDurations()—
getDescription()—
getSlotInterval()$duration = null
isReserveTime()—
getAvailableTimes()—
getTotalBufferTime()—
getMaxBookableDateTime()$startDate, $timeZone = 'UTC', $format = 'Y-m-d 23:59:59'
getMinBookableDateTime()$startDate = null, $timeZone = null
getMaxLookUpDate()—
getMinLookUpDate()$timeZone = 'UTC'
getCutoutSeconds()—
getHostIds()$hostId = null
getMaxBookingPerSlot()—
getPublicUrl()—
getMeta()$key, $default = null
updateMeta()$key, $value
getLocationFields()$calendarEvent = null
isDisplaySpots()—
isAdditionalGuestEnabled()—
isConfirmationEnabled()—
isConfirmationRequired()$bookingStartTime, $bookingCreatedTime = null
getCanNotCancelSettings()—
getCanNotRescheduleSettings()—
defaultLocationHtml()—
defaultPaymentIcon()$amount, $currencySettings = []
isPaymentEnabled()$duration = null
isPaidEvent()—
isWooEnabled()—
isCartEnabled()—
getPaymentItems()$duration = null
getEventPrice()$duration = null
getPricingTotal()$duration = null
getWooProductPrice()$duration = null
getWooProductPriceByDuration()$productIds = []
getPaymentHtml()—
isTeamDefaultSchedule()—
isTeamCommonSchedule()—
isRoundRobinDefaultSchedule()—
isRoundRobinCommonSchedule()—
isCollectiveDefaultSchedule()—
getWeeklySlots()$hostId = null
getDateOverrides()$hostId = null
getHostIdsSortedByBookings()$startDate, $hostId = null
getPaymentSettings()—
getHostSchedule()$hostId
getHostsSchedules()—
getCalendarEventsMeta()—
getIntegrationsMeta()—
getDirty()—