|
|
@@ -10,17 +10,23 @@ class InhabitantClassificationSeeder extends Seeder
|
|
|
public function run(): void
|
|
|
{
|
|
|
$classifications = [
|
|
|
- ['acronym' => 'P1', 'description' => 'Até 30.000 habitantes'],
|
|
|
- ['acronym' => 'P2', 'description' => 'De 30.001 a 70.000 habitantes'],
|
|
|
- ['acronym' => 'M1', 'description' => 'De 70.001 a 150.000 habitantes'],
|
|
|
- ['acronym' => 'M2', 'description' => 'De 150.001 a 300.000 habitantes'],
|
|
|
- ['acronym' => 'G1', 'description' => 'De 300.001 a 500.000 habitantes'],
|
|
|
- ['acronym' => 'G2', 'description' => 'Acima de 500.000 habitantes'],
|
|
|
+ ['description' => '50k', 'start' => 1, 'end' => 3, 'tbr_percentage' => 0.0000],
|
|
|
+ ['description' => '50k', 'start' => 4, 'end' => 12, 'tbr_percentage' => 0.4000],
|
|
|
+ ['description' => '50k', 'start' => 13, 'end' => 60, 'tbr_percentage' => 0.6000],
|
|
|
+ ['description' => '50k - 100k', 'start' => 1, 'end' => 3, 'tbr_percentage' => 0.0000],
|
|
|
+ ['description' => '50k - 100k', 'start' => 4, 'end' => 12, 'tbr_percentage' => 0.5000],
|
|
|
+ ['description' => '50k - 100k', 'start' => 13, 'end' => 60, 'tbr_percentage' => 0.7500],
|
|
|
+ ['description' => '100k - 200k', 'start' => 1, 'end' => 3, 'tbr_percentage' => 0.0000],
|
|
|
+ ['description' => '100k - 200k', 'start' => 4, 'end' => 12, 'tbr_percentage' => 0.7500],
|
|
|
+ ['description' => '100k - 200k', 'start' => 13, 'end' => 60, 'tbr_percentage' => 0.1000],
|
|
|
+ ['description' => '> 200k', 'start' => 1, 'end' => 3, 'tbr_percentage' => 0.0000],
|
|
|
+ ['description' => '> 200k', 'start' => 4, 'end' => 12, 'tbr_percentage' => 1.0000],
|
|
|
+ ['description' => '> 200k', 'start' => 13, 'end' => 60, 'tbr_percentage' => 1.5000],
|
|
|
];
|
|
|
|
|
|
foreach ($classifications as $item) {
|
|
|
InhabitantClassification::firstOrCreate(
|
|
|
- ['acronym' => $item['acronym']],
|
|
|
+ ['description' => $item['description'], 'start' => $item['start'], 'end' => $item['end']],
|
|
|
$item,
|
|
|
);
|
|
|
}
|