This commit is contained in:
2025-04-25 16:54:54 +08:00
parent 83d7395072
commit 907490a4a5
2 changed files with 11 additions and 0 deletions
+9
View File
@@ -35,6 +35,7 @@ class Location extends Model
return $this->hasMany(Vehicle::class, 'locations_id', 'id');
}
/**
* 目的地关联
* Get the vehicles for the location.
*/
public function finalVehicles()
@@ -42,6 +43,14 @@ class Location extends Model
return $this->hasMany(Vehicle::class, 'final_locations_id', 'id');
}
/**
* Get the FBO vehicles for the location.
*/
public function fboVehicles()
{
return $this->hasMany(Vehicle::class, 'fbo_locations_id', 'id');
}
/**
* Scope a query to only include locations that have vehicles.
*/