BusinessOperationHours
extends Model
in package
uses
HasFactory
BusinessOperationHours Model for managing business operating schedules and hours information.
This model is used to create and manage business operating hours data including daily schedules, holiday information, and real-time availability status. It provides a structured interface for storing and retrieving business-specific operating information such as daily opening and closing times, holiday schedules, current availability status, and display text for operating hours. The model supports comprehensive business hours management including daily schedules, holiday accommodations, and real-time availability tracking for enhanced airport guide platform functionality and business schedule management.
Tags
Table of Contents
Properties
- $business_id : int
- $created_at : string
- $display_text : string
- $friday_closed : string
- $friday_open : string
- $id : int
- $is_local_holiday : bool
- $monday_closed : string
- $monday_open : string
- $open_now : bool
- $saturday_closed : string
- $saturday_open : string
- $sunday_closed : string
- $sunday_open : string
- $thursday_closed : string
- $thursday_open : string
- $tuesday_closed : string
- $tuesday_open : string
- $updated_at : string
- $wednesday_closed : string
- $wednesday_open : string
- $fillable : array<string|int, mixed>
- The attributes that are mass assignable for business operation hours records.
Methods
- __construct() : void
- Initialize the BusinessOperationHours model with the correct database table configuration.
Properties
$business_id
public
int
$business_id
The foreign key reference to the business
$created_at
public
string
$created_at
Timestamp when the record was created
$display_text
public
string
$display_text
The display text for operating hours
$friday_closed
public
string
$friday_closed
The Friday closing time
$friday_open
public
string
$friday_open
The Friday opening time
$id
public
int
$id
The unique identifier for the business operation hours record
$is_local_holiday
public
bool
$is_local_holiday
Whether the business is closed for local holiday
$monday_closed
public
string
$monday_closed
The Monday closing time
$monday_open
public
string
$monday_open
The Monday opening time
$open_now
public
bool
$open_now
Whether the business is currently open
$saturday_closed
public
string
$saturday_closed
The Saturday closing time
$saturday_open
public
string
$saturday_open
The Saturday opening time
$sunday_closed
public
string
$sunday_closed
The Sunday closing time
$sunday_open
public
string
$sunday_open
The Sunday opening time
$thursday_closed
public
string
$thursday_closed
The Thursday closing time
$thursday_open
public
string
$thursday_open
The Thursday opening time
$tuesday_closed
public
string
$tuesday_closed
The Tuesday closing time
$tuesday_open
public
string
$tuesday_open
The Tuesday opening time
$updated_at
public
string
$updated_at
Timestamp when the record was last updated
$wednesday_closed
public
string
$wednesday_closed
The Wednesday closing time
$wednesday_open
public
string
$wednesday_open
The Wednesday opening time
$fillable
The attributes that are mass assignable for business operation hours records.
protected
array<string|int, mixed>
$fillable
= ['id', 'business_id', 'display_text', 'is_local_holiday', 'open_now', 'sunday_open', 'sunday_closed', 'monday_open', 'monday_closed', 'tuesday_open', 'tuesday_closed', 'wednesday_open', 'wednesday_closed', 'thursday_open', 'thursday_closed', 'friday_open', 'friday_closed', 'saturday_open', 'saturday_closed', 'created_at', 'updated_at']
This property defines the fields that can be mass-assigned when creating or updating BusinessOperationHours records. It includes all essential business hours fields such as identification, business relationships, display text, holiday information, current availability status, and daily operating schedules for all days of the week. The fillable attributes ensure data integrity while allowing efficient bulk operations for business hours management and schedule tracking across different time zones and holiday accommodations.
Methods
__construct()
Initialize the BusinessOperationHours model with the correct database table configuration.
public
__construct() : void
This function is used to create a properly configured BusinessOperationHours model instance by setting the database table name from the configuration constants. It ensures that the model interacts with the correct database table for business operation hours data information, which is essential for proper business hours storage and retrieval operations. The constructor dynamically assigns the table name based on the BUSINESS_OPERATION_HOURS configuration constant to maintain flexibility and configuration-driven behavior for business hours data management.