Skip to content

ProjectCity

A ProjectCity is one location attached to a project, holding its coordinates and the number of candidates targeted there at each pipeline tier.

Projects are delivered against a geographic footprint. Each row records a city, optionally its country, a latitude/longitude pair for plotting on the geography map, and three target counts (high, primary, secondary). The counts drive both the map markers and the tier totals shown on the geography page.

Rows are created by staff, usually in bulk from a CSV, and read by the geography page.

  • app/Services/Geography/ProjectGeographyService.php — builds the geography payload for the project page.
  • app/Filament/Resources/ProjectResource/RelationManagers/ProjectCitiesRelationManager.php — staff editing of a project’s cities.
  • app/Filament/Actions/UploadProjectCitiesCsvAction.php — bulk import from a CSV upload.
  • app/Http/Controllers/Projects/ProjectsGeographyController.php — renders the geography Inertia page.
Relation Type Related model
project belongsTo Project

The inverse is Project::cities().

Table project_cities. Primary key is a UUID (HasUuids).

Column Type Notes
id uuid Primary key
project_id uuid FK to projects
city string City name
country string Nullable
latitude decimal:7 Cast to 7 decimal places
longitude decimal:7 Cast to 7 decimal places
high_target integer Defaults to 0
primary_target integer Defaults to 0
secondary_target integer Defaults to 0
created_at, updated_at datetime Timestamps

The model also exposes a computed grand_total accessor — the sum of the three target columns. It is not stored.