add spatial plannings retribution calculations
This commit is contained in:
62
database/seeders/FloorHeightIndexSeeder.php
Normal file
62
database/seeders/FloorHeightIndexSeeder.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\FloorHeightIndex;
|
||||
|
||||
class FloorHeightIndexSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$indices = [
|
||||
[
|
||||
'floor_number' => 1,
|
||||
'ip_ketinggian' => 1.000000,
|
||||
'description' => 'IP ketinggian untuk lantai 1'
|
||||
],
|
||||
[
|
||||
'floor_number' => 2,
|
||||
'ip_ketinggian' => 1.090000,
|
||||
'description' => 'IP ketinggian untuk lantai 2'
|
||||
],
|
||||
[
|
||||
'floor_number' => 3,
|
||||
'ip_ketinggian' => 1.120000,
|
||||
'description' => 'IP ketinggian untuk lantai 3'
|
||||
],
|
||||
[
|
||||
'floor_number' => 4,
|
||||
'ip_ketinggian' => 1.350000,
|
||||
'description' => 'IP ketinggian untuk lantai 4'
|
||||
],
|
||||
[
|
||||
'floor_number' => 5,
|
||||
'ip_ketinggian' => 1.620000,
|
||||
'description' => 'IP ketinggian untuk lantai 5'
|
||||
],
|
||||
[
|
||||
'floor_number' => 6,
|
||||
'ip_ketinggian' => 1.197000,
|
||||
'description' => 'IP ketinggian untuk lantai 6'
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($indices as $index) {
|
||||
FloorHeightIndex::updateOrCreate(
|
||||
['floor_number' => $index['floor_number']],
|
||||
$index
|
||||
);
|
||||
}
|
||||
|
||||
$this->command->info('Floor Height Index seeding completed!');
|
||||
$this->command->info('IP Ketinggian values:');
|
||||
foreach ($indices as $index) {
|
||||
$this->command->info("Lantai {$index['floor_number']}: {$index['ip_ketinggian']}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user