26 lines
980 B
PHP
26 lines
980 B
PHP
<?php
|
|
namespace App\Models;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* نموذج موقع السيارة (CarLocation Model)
|
|
*
|
|
* الغرض من الملف:
|
|
* تتبع الموقع الجغرافي الحي للسائقين على الخريطة.
|
|
*
|
|
* كيفية العمل:
|
|
* 1. يرتبط بجدول (car_locations) في قاعدة بيانات التتبع (tracking).
|
|
* 2. يخزن خطوط الطول والعرض (Latitude & Longitude) والسرعة والاتجاه.
|
|
* 3. يستخدم لتحديث خريطة الراكب بمكان السائق في الوقت الفعلي.
|
|
*/
|
|
class CarLocation extends Model
|
|
{
|
|
protected $connection = 'tracking';
|
|
protected $table = 'car_locations';
|
|
protected $primaryKey = 'driver_id';
|
|
protected $keyType = 'string';
|
|
public $incrementing = false;
|
|
public $timestamps = false;
|
|
protected $fillable = ['driver_id', 'latitude', 'longitude', 'heading', 'speed', 'distance', 'status', 'carType'];
|
|
}
|