create mission tables with factory and seeder

This commit is contained in:
2025-05-18 13:19:26 +03:30
parent 82c1cc0e18
commit 3a8a6e3a70
23 changed files with 408 additions and 365 deletions

View File

@@ -129,8 +129,8 @@ class RoadObservationProblems extends Command
'rms_city_id' => NikarayanComplaints::mapCities((int) $value->fk_Town) ?? null,
'observed_way_id' => $nominatimService->get_way_id_from_nominatim($value->XGeo, $value->YGeo) ?? null,
'province_id' => $city ? $city['province_id'] : null,
'city_id' => $city ? $city['city_id'] : null,
'province_id' => $cityModel->province()->first()->id,
'city_id' => $cityModel->id,
// 'handler_type' => EdarateShahri::class,
'edarate_shahri_id' => $cityModel->edarateShahri()->first()->id,
'province_fa' => (isset($city['province_id']) ? Province::find($city['province_id'])->name_fa : null),
@@ -147,7 +147,7 @@ class RoadObservationProblems extends Command
return $result;
}
echo 'done at: ' . date("Y-m-d H:i:s") . "\n";
$this->info("{$affectedRows} row's affected");
echo "{$affectedRows} row's affected";
return 0;
}
}