AirportImages
extends Model
in package
uses
HasFactory
AirportImages Model for managing comprehensive airport image and visual content.
This model is used to create and manage airport image data including various image types, formats, and visual content for different airport services. It provides a structured interface for storing and retrieving airport-specific visual assets such as main images, rental car images, hotel images, shuttle images, parking images, and map content. The model supports multiple image formats (JPEG, WebP) and includes flag indicators for content management and display control. It ensures proper database table configuration and maintains data integrity for airport visual content management across the airport guide platform.
Tags
Table of Contents
Properties
- $airport_id : int
- $crated_by : int
- $created_at : string
- $hotel_flag : int
- $hotel_img : string|null
- $hotel_img_path : string|null
- $hotel_webp_img : string|null
- $icao_identifier : string
- $id : int
- $locid : string
- $main_flag : int
- $main_img : string|null
- $main_img_path : string|null
- $main_webp_img : string|null
- $map_description : string|null
- $map_doc : string|null
- $map_doc_path : string|null
- $map_flag : int
- $map_img : string|null
- $map_img_path : string|null
- $map_webp_img : string|null
- $parkin_flag : int
- $parking_img : string|null
- $parking_img_path : string|null
- $parking_map_flag : int
- $parking_map_img : string|null
- $parking_map_img_path : string|null
- $parking_map_webp_img : string|null
- $parking_webp_img : string|null
- $rental_flag : int
- $rental_img : string|null
- $rental_img_path : string|null
- $rental_webp_img : string|null
- $shuttle_flag : int
- $shuttle_img : string|null
- $shuttle_img_path : string|null
- $shuttle_webp_img : string|null
- $updated_at : string
- $updated_by : int
- $fillable : array<string|int, mixed>
- The attributes that are mass assignable for airport images records.
Methods
- __construct() : void
- Initialize the AirportImages model with the correct database table configuration.
Properties
$airport_id
public
int
$airport_id
The foreign key reference to the airport
$crated_by
public
int
$crated_by
User ID who created the record (note: typo in field name)
$created_at
public
string
$created_at
Timestamp when the record was created
$hotel_flag
public
int
$hotel_flag
Flag indicating if hotel image is active
$hotel_img
public
string|null
$hotel_img
The hotel service image filename
$hotel_img_path
public
string|null
$hotel_img_path
The file path for the hotel service image
$hotel_webp_img
public
string|null
$hotel_webp_img
The hotel service WebP image filename
$icao_identifier
public
string
$icao_identifier
The ICAO airport identifier code
$id
public
int
$id
The unique identifier for the airport images record
$locid
public
string
$locid
The airport location identifier code
$main_flag
public
int
$main_flag
Flag indicating if main image is active
$main_img
public
string|null
$main_img
The main airport image filename
$main_img_path
public
string|null
$main_img_path
The file path for the main airport image
$main_webp_img
public
string|null
$main_webp_img
The main airport WebP image filename
$map_description
public
string|null
$map_description
Description text for the airport map
$map_doc
public
string|null
$map_doc
The airport map document filename
$map_doc_path
public
string|null
$map_doc_path
The file path for the airport map document
$map_flag
public
int
$map_flag
Flag indicating if map image is active
$map_img
public
string|null
$map_img
The airport map image filename
$map_img_path
public
string|null
$map_img_path
The file path for the airport map image
$map_webp_img
public
string|null
$map_webp_img
The airport map WebP image filename
$parkin_flag
public
int
$parkin_flag
Flag indicating if parking image is active (note: typo in field name)
$parking_img
public
string|null
$parking_img
The parking service image filename
$parking_img_path
public
string|null
$parking_img_path
The file path for the parking service image
$parking_map_flag
public
int
$parking_map_flag
Flag indicating if parking map image is active
$parking_map_img
public
string|null
$parking_map_img
The parking map image filename
$parking_map_img_path
public
string|null
$parking_map_img_path
The file path for the parking map image
$parking_map_webp_img
public
string|null
$parking_map_webp_img
The parking map WebP image filename
$parking_webp_img
public
string|null
$parking_webp_img
The parking service WebP image filename
$rental_flag
public
int
$rental_flag
Flag indicating if rental image is active
$rental_img
public
string|null
$rental_img
The rental car service image filename
$rental_img_path
public
string|null
$rental_img_path
The file path for the rental car service image
$rental_webp_img
public
string|null
$rental_webp_img
The rental car service WebP image filename
$shuttle_flag
public
int
$shuttle_flag
Flag indicating if shuttle image is active
$shuttle_img
public
string|null
$shuttle_img
The shuttle service image filename
$shuttle_img_path
public
string|null
$shuttle_img_path
The file path for the shuttle service image
$shuttle_webp_img
public
string|null
$shuttle_webp_img
The shuttle service WebP image filename
$updated_at
public
string
$updated_at
Timestamp when the record was last updated
$updated_by
public
int
$updated_by
User ID who last updated the record
$fillable
The attributes that are mass assignable for airport images records.
protected
array<string|int, mixed>
$fillable
= ['id', 'airport_id', 'locid', 'icao_identifier', 'main_img', 'main_webp_img', 'main_img_path', 'rental_img', 'rental_webp_img', 'rental_img_path', 'hotel_img', 'hotel_webp_img', 'hotel_img_path', 'shuttle_img', 'shuttle_webp_img', 'shuttle_img_path', 'parking_img', 'parking_webp_img', 'parking_img_path', 'main_flag', 'rental_flag', 'hotel_flag', 'shuttle_flag', 'parkin_flag', 'crated_by', 'updated_by', 'created_at', 'updated_at', 'map_img', 'map_webp_img', 'map_flag', 'map_img_path', 'map_description', 'parking_map_flag', 'parking_map_img', 'parking_map_webp_img', 'parking_map_img_path', 'map_doc', 'map_doc_path', 'cdn_main_img_status', 'cdn_parking_map_img_status', 'main_original_img', 'map_original_img', 'parking_original_img']
This property defines the fields that can be mass-assigned when creating or updating AirportImages records. It includes all essential airport image fields such as identification, various image types (main, rental, hotel, shuttle, parking, maps), multiple image formats (JPEG, WebP), file paths, flag indicators for content management, and metadata fields. The fillable attributes ensure data integrity while allowing efficient bulk operations for airport visual content management across different service categories.
Methods
__construct()
Initialize the AirportImages model with the correct database table configuration.
public
__construct() : void
This function is used to create a properly configured AirportImages model instance by setting the database table name from the configuration constants. It ensures that the model interacts with the correct database table for airport images information, which is essential for proper visual content storage and retrieval operations. The constructor dynamically assigns the table name based on the AIRPORT_IMAGES configuration constant to maintain flexibility and configuration-driven behavior for airport visual content management.