BusinessPhotoDetails
extends Model
in package
uses
HasFactory
BusinessPhotoDetails Model for managing business photo details and image metadata.
This model is used to create and manage business photo data including image specifications, file paths, download status, and primary image designation. It provides a structured interface for storing and retrieving business-specific photo information such as image dimensions, file naming conventions, storage paths, download tracking, and primary image flags. The model supports comprehensive business photo management including image specifications, file organization, download status tracking, and primary image designation for enhanced airport guide platform functionality and business visual content management.
Tags
Table of Contents
Properties
- $business_id : int
- $created_at : string
- $height : int
- $id : int
- $img_deleted : bool
- $img_name : string
- $img_path : string
- $img_prefix : string
- $img_suffix : string
- $is_downloaded : bool
- $is_primary : bool
- $updated_at : string
- $width : int
- $fillable : array<string|int, mixed>
- The attributes that are mass assignable for business photo details records.
Methods
- __construct() : void
- Initialize the BusinessPhotoDetails 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
$height
public
int
$height
The image height in pixels
$id
public
int
$id
The unique identifier for the business photo details record
$img_deleted
public
bool
$img_deleted
Whether the image has been marked as deleted
$img_name
public
string
$img_name
The complete image filename
$img_path
public
string
$img_path
The file path where the image is stored
$img_prefix
public
string
$img_prefix
The image filename prefix
$img_suffix
public
string
$img_suffix
The image filename suffix
$is_downloaded
public
bool
$is_downloaded
Whether the image has been downloaded
$is_primary
public
bool
$is_primary
Whether this is the primary image for the business
$updated_at
public
string
$updated_at
Timestamp when the record was last updated
$width
public
int
$width
The image width in pixels
$fillable
The attributes that are mass assignable for business photo details records.
protected
array<string|int, mixed>
$fillable
= ['id', 'business_id', 'img_prefix', 'img_suffix', 'width', 'height', 'created_at', 'updated_at', 'is_downloaded', 'img_name', 'img_path', 'is_primary', 'img_deleted']
This property defines the fields that can be mass-assigned when creating or updating BusinessPhotoDetails records. It includes all essential business photo fields such as identification, business relationships, image specifications, file naming conventions, storage paths, download status tracking, primary image designation, and deletion status. The fillable attributes ensure data integrity while allowing efficient bulk operations for business photo management and visual content organization across different image formats and storage locations.
Methods
__construct()
Initialize the BusinessPhotoDetails model with the correct database table configuration.
public
__construct() : void
This function is used to create a properly configured BusinessPhotoDetails 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 photo details data information, which is essential for proper business photo storage and retrieval operations. The constructor dynamically assigns the table name based on the BUSINESS_PHOTO_DETAILS configuration constant to maintain flexibility and configuration-driven behavior for business photo data management.