Skip to main content

BusinessHoursSchedule Model

The BusinessHoursSchedule model represents business hours configuration for time-based call routing.

Overview

PropertyValue
NamespaceApp\Models
Tablebusiness_hours_schedules
Primary Keyid
Global ScopeOrganizationScope

Database Schema

ColumnTypeNullableDescription
idbigint unsignedNoPrimary key
organization_idbigint unsignedNoOrganization ID
namevarchar(255)NoSchedule name
timezonevarchar(100)NoPHP timezone identifier
statusvarchar(50)Noactive/inactive
configurationjsonYesSchedule configuration
created_attimestampNoCreation timestamp
updated_attimestampNoUpdate timestamp

Relationships

Belongs To

  • organization() → Organization

Has Many

  • days() → BusinessHoursScheduleDay[]
  • exceptions() → BusinessHoursException[]

Configuration Structure

{
"monday": {
"is_open": true,
"time_ranges": [
{"start": "09:00", "end": "12:00"},
{"start": "13:00", "end": "17:00"}
]
},
"tuesday": { ... },
...
}