Skip to content

Calendar Model ​

Top-level scheduling container that owns event types, availability, and bookings for a host or resource.

Class ​

  • Source: fluent-booking/app/Models/Calendar.php
  • Table: fcal_calendars
  • 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.
account_idBIGINT(20) UNSIGNEDYes—Foreign key to a related record.
parent_idBIGINT(20) UNSIGNEDYes—Parent row used for rescheduled or grouped bookings.
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.
statusVARCHAR(20)NoactiveLifecycle status (scheduled, cancelled, completed, rejected, pending).
typeVARCHAR(20)NosimpleSubtype discriminator.
event_typeVARCHAR(20)Noschedulingsingle or group event.
account_typeVARCHAR(20)NofreeAccount Type stored for this record.
visibilityVARCHAR(20)NopublicVisibility stored for this record.
author_timezoneVARCHAR(192)YesUTCAuthor Timezone 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
slots()hasManyCalendarSlot
events()hasManyCalendarSlot
user()belongsToUser
bookings()hasManyBooking
availabilities()hasManyAvailability
metas()hasManyMeta

Public Methods ​

MethodSignature
setSettingsAttribute()$settings
getSettingsAttribute()$settings
slots()—
events()—
getMemberIds()—
user()—
bookings()—
availabilities()—
metas()—
isTeamCalendar()—
isEventCalendar()—
isHostCalendar()—
updateEventOrder()$eventId
getAuthorPhoto()—
getAuthorProfile()$public = true
getMeta()$key, $default = null
updateMeta()$key, $value
getLandingPageUrl()$isForce = false
getDirty()—
getAllHosts()—