first commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php if (!defined('BASEPATH')) {
|
||||
exit('No direct script access allowed');
|
||||
}
|
||||
|
||||
class Quote_Estimate_model extends CI_Model
|
||||
{
|
||||
private $id;
|
||||
private $price;
|
||||
private $surge_price;
|
||||
private $trip_time;
|
||||
private $distance;
|
||||
private $is_holiday;
|
||||
private $day_of_week;
|
||||
private $weather_conditions;
|
||||
private $created_at;
|
||||
private $updated_at;
|
||||
|
||||
public function __constructor()
|
||||
{
|
||||
parrent::__constructor();
|
||||
}
|
||||
|
||||
public function QuoteEstimate()
|
||||
{
|
||||
$result = [
|
||||
'id' => 1,
|
||||
'price' => 50,
|
||||
'surge_price' => 33.57,
|
||||
'trip_time' => '3300',
|
||||
'distance' => 7900,
|
||||
'is_holiday' => true,
|
||||
'day_of_week' => 5,
|
||||
'weather_conditions' => [
|
||||
'temperature' => 30,
|
||||
'status' => 'cloudy',
|
||||
],
|
||||
'created_at' => '2019-10-07T03:29:14.676Z',
|
||||
'updated_at' => null,
|
||||
];
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getQuoteEstimates()
|
||||
{
|
||||
$response = array();
|
||||
|
||||
// TODO: Get address items from sqeAPI
|
||||
for ($i = 0; $i < 30; $i++) {
|
||||
$response[] = $this->QuoteEstimate();
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user