fix(master-rule): fix indicator seeder and rule seeder
This commit is contained in:
parent
c820a4a47e
commit
bbbfda3150
|
@ -18,7 +18,7 @@ public function run(): void
|
|||
['name' => 'Ketinggian Tempat'],
|
||||
['name' => 'Ketersediaan Air'],
|
||||
['name' => 'Curah Hujan'],
|
||||
['name' => 'Isolasi']
|
||||
['name' => 'Isolasi Jarak']
|
||||
];
|
||||
|
||||
foreach ($indicator as $item) {
|
||||
|
|
|
@ -15,22 +15,19 @@ public function run(): void
|
|||
{
|
||||
$rules = [
|
||||
// pH Tanah
|
||||
['indicator_id' => 1, 'parameter_type' => "Sangat Asam", 'description' => "Tingkat keasaman pH tanah kurang dari 5.5", 'cf' => -0.6],
|
||||
['indicator_id' => 1, 'parameter_type' => "Asam", 'description' => "Tingkat keasaman pH tanah antara 5.5 - 6.0", 'cf' => 0.6],
|
||||
['indicator_id' => 1, 'parameter_type' => "Netral", 'description' => "Tingkat keasaman pH tanah antara 6.1 - 7.0", 'cf' => 1.0],
|
||||
['indicator_id' => 1, 'parameter_type' => "Basa", 'description' => "Tingkat keasaman pH tanah antara 7.1 - 7.5", 'cf' => 0.6],
|
||||
['indicator_id' => 1, 'parameter_type' => "Sangat Basa", 'description' => "Tingkat keasaman pH tanah lebih besar dari 7.5", 'cf' => -0.4],
|
||||
['indicator_id' => 1, 'parameter_type' => "Asam", 'description' => "Tingkat keasaman pH tanah kurang dari 6", 'cf' => -0.6],
|
||||
['indicator_id' => 1, 'parameter_type' => "Ideal", 'description' => "Tingkat keasaman pH tanah antara 6.0 - 7.0", 'cf' => 0.8],
|
||||
['indicator_id' => 1, 'parameter_type' => "Basa", 'description' => "Tingkat keasaman pH tanah lebih dari 7.0", 'cf' => -0.8],
|
||||
|
||||
// Ketinggian Tempat
|
||||
['indicator_id' => 2, 'parameter_type' => "Rendah", 'description' => "Lahan berada di dataran rendah (<300 mdpl)", 'cf' => 1.0],
|
||||
['indicator_id' => 2, 'parameter_type' => "Sedang", 'description' => "Lahan berada di ketinggian sedang (300 - 700 mdpl)", 'cf' => 0.7],
|
||||
['indicator_id' => 2, 'parameter_type' => "Tinggi", 'description' => "Lahan berada di dataran tinggi (>700 mdpl)", 'cf' => -0.5],
|
||||
['indicator_id' => 2, 'parameter_type' => "Rendah", 'description' => "Lahan berada di dataran rendah (<200 mdpl)", 'cf' => -0.6],
|
||||
['indicator_id' => 2, 'parameter_type' => "Sedang", 'description' => "Lahan berada di ketinggian sedang (250 - 600 mdpl)", 'cf' => 0.8],
|
||||
['indicator_id' => 2, 'parameter_type' => "Tinggi", 'description' => "Lahan berada di dataran tinggi (>600 mdpl)", 'cf' => -0.4],
|
||||
|
||||
// Ketersediaan Air
|
||||
['indicator_id' => 3, 'parameter_type' => "Berlimpah", 'description' => "Irigasi teknis, air selalu tersedia sepanjang tahun", 'cf' => 1.0],
|
||||
['indicator_id' => 3, 'parameter_type' => "Cukup", 'description' => "Sumber air stabil, tetapi tidak selalu tersedia", 'cf' => 0.8],
|
||||
['indicator_id' => 3, 'parameter_type' => "Terbatas", 'description' => "Kadang-kadang mengalami kekeringan", 'cf' => -0.5],
|
||||
['indicator_id' => 3, 'parameter_type' => "Sangat Terbatas", 'description' => "Sering mengalami kekeringan", 'cf' => -0.8],
|
||||
['indicator_id' => 3, 'parameter_type' => "Cukup", 'description' => "Sumber air stabil, tetapi tidak selalu tersedia", 'cf' => 0.6],
|
||||
['indicator_id' => 3, 'parameter_type' => "Terbatas", 'description' => "Kadang-kadang mengalami kekeringan", 'cf' => -0.6],
|
||||
|
||||
// Curah Hujan
|
||||
['indicator_id' => 4, 'parameter_type' => "Rendah", 'description' => "Curah hujan kurang dari 1000 mm/tahun", 'cf' => -0.6],
|
||||
|
@ -39,10 +36,9 @@ public function run(): void
|
|||
['indicator_id' => 4, 'parameter_type' => "Sangat Tinggi", 'description' => "Curah hujan lebih dari 2000 mm/tahun", 'cf' => -0.4],
|
||||
|
||||
// Isolasi (Jarak Antar Lahan)
|
||||
['indicator_id' => 5, 'parameter_type' => "Sangat Baik", 'description' => "Jarak antar lahan sangat dekat (0 - 50 meter)", 'cf' => 1.0],
|
||||
['indicator_id' => 5, 'parameter_type' => "Baik", 'description' => "Jarak antar lahan cukup dekat (50 - 200 meter)", 'cf' => 0.8],
|
||||
['indicator_id' => 5, 'parameter_type' => "Sedang", 'description' => "Jarak antar lahan cukup jauh (200 - 500 meter)", 'cf' => -0.4],
|
||||
['indicator_id' => 5, 'parameter_type' => "Buruk", 'description' => "Lahan sangat terisolasi (>500 meter)", 'cf' => -0.7],
|
||||
['indicator_id' => 5, 'parameter_type' => "Telalu Dekat", 'description' => "Jarak antar lahan sangat dekat < 250 meter", 'cf' => -0.8],
|
||||
['indicator_id' => 5, 'parameter_type' => "Aman", 'description' => "Jarak antar lahan cukup jauh 250 - 400 meter", 'cf' => 0.8],
|
||||
['indicator_id' => 5, 'parameter_type' => "Jauh", 'description' => "Jarak antar lahan jauh > 400 meter", 'cf' => 1.0],
|
||||
];
|
||||
|
||||
foreach ($rules as $rule) {
|
||||
|
|
Loading…
Reference in New Issue