update seeder for segment constant

This commit is contained in:
edmondlang
2022-08-06 01:57:34 +08:00
parent cd59debee4
commit e7f8b62116
@@ -28,10 +28,7 @@ class SegmentConstantsTableSeeder extends Seeder
$today = date("Y-m-d");
$prices = [];
for($ii=0; $ii<$n_days;$ii++){
$prices[] = [
"date" => date('Y-m-d', strtotime($today. ' + '.$ii.' days')),
"price" => rand(10, 30) / 10
];
$prices[date('Y-m-d', strtotime($today. ' + '.$ii.' days'))] = rand(10, 30) / 10;
}
$this->insertData(1, SegmentConstants::BASE_PRICE, $prices);
@@ -127,9 +124,7 @@ class SegmentConstantsTableSeeder extends Seeder
$this->insertData(1, SegmentConstants::OUTSTATION_POSTCODE, $prices);
// insert customer prices
$prices = [
['id'=> 1, 'price' => 15 ]
];
$prices = [15];
$this->insertData(2, SegmentConstants::CUSTOMER_RATE, $prices);
}