Merge branch 'master' into 'local_production'
Master
See merge request !43
Showing
Webservices.php
0 → 100644
application/controllers/Brand.php
0 → 100644
application/controllers/Mailtemplate.php
0 → 100644
application/controllers/Orders.php
0 → 100644
application/controllers/Product.php
0 → 100644
... | @@ -95,4 +95,21 @@ | ... | @@ -95,4 +95,21 @@ |
$unique = md5(uniqid(time().mt_rand(), true)); | $unique = md5(uniqid(time().mt_rand(), true)); | ||
return $unique; | return $unique; | ||
} | } | ||
function getNotifTemplate(){ | |||
$CI = & get_instance(); | |||
$settings = $CI->db->get('notification_templates'); | |||
return (!empty($settings))?$settings->row_array():''; | |||
} | |||
function send_mail($subject,$email,$message,$attach=null) { | |||
$headers = "MIME-Version: 1.0" . "\r\n"; | |||
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; | |||
$headers .= "From: [email protected] \r\n"; | |||
$headers .= "Reply-To: ". $email. "\r\n"; | |||
$headers .= "X-Mailer: PHP/" . phpversion(); | |||
$headers .= "X-Priority: 1" . "\r\n"; | |||
mail($email, $subject, $message, $headers); | |||
} | |||
?> | ?> | ||
\ No newline at end of file |
application/models/Brand_model.php
0 → 100644
application/models/Mailtemplate_model.php
0 → 100644
application/models/Order_model.php
0 → 100644
application/models/Product_model.php
0 → 100644
<?php | <?php | ||
class Webservice_model extends CI_Model { | |||
class Webservice_model extends CI_Model { | |||
function __construct() { | function __construct() { | ||
parent::__construct(); | parent::__construct(); | ||
date_default_timezone_set('Asia/Kolkata'); | date_default_timezone_set('Asia/Kolkata'); | ||
} | |||
public function join_has_driver($request){ | |||
$result = array('status' => 'error'); | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if(empty($query)){ | |||
return $result; | |||
} | |||
if ($query->num_rows() <= 0) { | |||
return $result; | |||
} | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$data = array('users_id' =>$id, | |||
'profile_pic' =>$request['picture'], | |||
'id_proof' =>$request['car_id'], | |||
'car_front' =>$request['car_front'], | |||
'car_back' =>$request['car_back']); | |||
$res = $this->db->insert('drivers',$data); | |||
if($res){ | |||
$result = array('status' => 'success'); | |||
} else { | |||
$result = array('status' => 'error','message'=>'Already Exist'); | |||
} | |||
return $result; | |||
} | |||
public function update_driver_location($request) { | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$data = array('driver_lat' => $request['latitude'], | |||
'driver_lng' => $request['longitude']); | |||
$result = $this->db->where('users_id', $id)->update('drivers', $data); | |||
return $result; | |||
} else { | |||
return false; | |||
} | |||
} | |||
public function registration($data) { | |||
$num = $this->db->where('email_id', $data['email'])->get('users')->num_rows(); | |||
if($num > 0) { | |||
$result = array('status' => 'error', 'message' => 'Email Already Exists'); | |||
} | |||
else { | |||
$unique_id = $this->generate_unique(); | |||
$this->db->insert('users', array('first_name' => $data['first_name'], | |||
'surname' => $data['sur_name'], | |||
'email_id' => $data['email'], | |||
'password' => md5($data['password']), | |||
'profile_image' => $data['profile_photo'], | |||
'phone' => $data['phone'], | |||
// 'is_phone_verified' => '1' | |||
)); | |||
$user_id = $this->db->insert_id(); | |||
$phone_verified = array( | |||
'phone_verified' => '1' | |||
); | |||
$this->db->where('users_id', $user_id); | |||
$this->db->update('user_profile', $phone_verified); | |||
$data2 = "SELECT * FROM users WHERE id = '$user_id'"; | |||
$query = $this->db->query($data2); | |||
$rs2 = $query->row(); | |||
$data = array('user_id' => $user_id, | |||
'first_name' =>$rs2->first_name, | |||
'sur_name' =>$rs2->surname, | |||
'phone' => $rs2->phone, | |||
'email'=>$rs2->email_id, | |||
'profile_photo'=>$rs2->profile_image); | |||
$this->EncryptedPatientKey($user_id,$unique_id); | |||
if ($user_id) { | |||
$result = array('status' => 'success', 'user_id' => $user_id, 'auth_token' => $unique_id,'user' => $data,); | |||
} else { | |||
$result = array('status' => 'error'); | |||
} | |||
} | |||
return $result; | |||
} | |||
public function generate_unique() { | |||
$unqe = md5(uniqid(time().mt_rand(), true)); | |||
return $unqe; | |||
} | |||
public function EncryptedPatientKey($user_id,$unique_id) { | |||
$this->db->insert('auth_table', array('member_id' => $user_id, 'unique_id' => $unique_id)); | |||
} | |||
public function check_email_availability($data){ | |||
$num = $this->db->where('email_id', $data['email'])->get('users')->num_rows(); | |||
$email = $data['email']; | |||
if($num > 0){ | |||
$result = array('status' => 'success', 'data'=> array('email' => $email, 'is_email_avaliable'=>false)); | |||
} | |||
else{ | |||
$result = array('status' => 'success', 'data'=> array('email' => $email, 'is_email_avaliable'=>true)); | |||
} | } | ||
return $result; | /***************************************************************************************/ | ||
} | /****************************************Mobile API's***********************************/ | ||
public function check_phone_availability($data){ | |||
$num = $this->db->where('phone', $data['phone'])->get('users')->num_rows(); | |||
$phone = $data['phone']; | |||
if($num > 0){ | |||
$result = array('status' => 'success', 'data'=> array('phone' => $phone, 'is_phone_avaliable'=>false)); | |||
} | |||
else{ | |||
$result = array('status' => 'success', 'data'=> array('phone' => $phone, 'is_phone_avaliable'=>true)); | |||
} | |||
return $result; | |||
} | |||
public function login($request){ | |||
$this->db->where('email_id', $request['email']); | |||
$this->db->where('password', md5($request['password'])); | |||
$this->db->where('status', 1); | |||
$query = $this->db->select('*')->from('users')->join('user_profile','user_profile.users_id = users.id')->get(); | |||
if ($query->num_rows() > 0) { | |||
$unique_id = $this->generate_unique(); | |||
$rs = $query->row(); | |||
$is_phone_verified = $rs->phone_verified==1?'true':'false'; | |||
$is_driver_status = $rs->is_driver; | |||
//$is_phone_verified = $is_phone==1?'true':'false'; | |||
$data = array('user_id' => $rs->id, | |||
'first_name' =>$rs->first_name, | |||
'sur_name' =>$rs->surname, | |||
'phone' => $rs->phone, | |||
'email'=>$rs->email_id, | |||
'profile_photo'=>$rs->profile_image, | |||
'is_driver' => $is_driver_status==1?'true':'false', | |||
'is_phone_verified' => $is_phone_verified | |||
); | |||
$this->EncryptedPatientKey($rs->id,$unique_id); | |||
$result = array('status' => 'success', 'auth_token' => $unique_id,'user' => $data); | |||
} else { | |||
$result = array('status' => 'error'); | |||
} | |||
return $result; | |||
} | |||
public function forgot_password($data){ | |||
$this->db->where('email_id',$data['email']); | |||
$query = $this->db->get('users'); | |||
$rs = $query->row(); | |||
if ($rs) { | |||
$username = $query->first_name; | |||
$this->load->helper('string'); | |||
$rand_pwd = random_string('alnum', 8); | |||
$password = array( | |||
'password' => md5($rand_pwd) | |||
); | |||
$this->db->where('email_id', $data['email']); | |||
$query = $this->db->update('users', $password); | |||
if ($query) { | |||
$this->load->library('email'); | |||
$config = Array( | |||
'protocol' => 'smtp', | |||
'smtp_host' => 'mail.techlabz.in', | |||
'smtp_port' => 587, | |||
'smtp_user' => '[email protected]', // change it to yours | |||
'smtp_pass' => 'k4$_a4%eD?Hi', // change it to yours | |||
'smtp_timeout' => 20, | |||
'mailtype' => 'html', | |||
'charset' => 'iso-8859-1', | |||
'wordwrap' => TRUE); | |||
$this->email->initialize($config); | |||
$subject = 'New Mail'; | |||
//$this->email->set_newline("\r\n"); | |||
$this->email->from('[email protected]', $settings->title); | |||
$this->email->to($data->email); | |||
$this->email->subject("Forget Password"); | |||
$this->email->message("New Password is:".$rand_pwd); | |||
$this->email->send(); | |||
$rs = $this->email->print_debugger(); | |||
return "EmailSend"; | |||
} | |||
} | |||
else { | |||
return false; | |||
} | |||
} | |||
public function update_fcm_token($request) { | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$data = array('fcm_token' => $request['fcm_token']); | |||
$result = $this->db->where('users_id', $id)->update('user_profile', $data); | |||
return $result; | |||
} else { | |||
return false; | |||
} | |||
} | |||
public function categories(){ | |||
$sql = "SELECT id AS category_id,cat_name as category_name,image AS category_image FROM category WHERE status = '1' "; | |||
$query = $this->db->query($sql); | |||
if ($query->num_rows() >= 0) { | |||
$data = $query->result(); | |||
$result = array('status' => 'success','user' => $data); | |||
} | |||
else{ | |||
$result = array('status' => 'error'); | |||
} | |||
return $result; | |||
} | |||
public function get_user_type($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$driver_id = $rs->member_id; | |||
$sql = "SELECT is_driver,driver_enabled FROM user_profile WHERE users_id = $driver_id"; | |||
$query = $this->db->query($sql); | |||
// echo $this->db->last_query(); | |||
// die; | |||
$data = $query->result(); | |||
$is_driver = $data[0]->is_driver; | |||
$is_driver_enabled = $data[0]->driver_enabled; | |||
if($is_driver=="1"){ | |||
$request['is_driver'] = "true"; | |||
}else{ | |||
$request['is_driver'] = "false"; | |||
} | |||
if($is_driver_enabled=="1"){ | |||
$request['is_driver_enabled'] = "true"; | |||
}else{ | |||
$request['is_driver_enabled'] = "false"; | |||
} | |||
$result = array('status' => 'success','data' => $request['is_driver'],'res'=>$request['is_driver_enabled']); | |||
}else{ | |||
$result = array('status' => 'error'); | |||
} | |||
return $result; | |||
} | |||
public function set_user_type($request){ | |||
//pr($request); | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$driver_id = $rs->member_id; | |||
$data = array('is_driver'=>$request['is_driver']); | |||
$this->db->where('users_id', $driver_id)->update('user_profile', $data); | |||
$is_driver = $request['is_driver']; | |||
if($is_driver=="1"){ | |||
$request['is_driver'] = "true"; | |||
}else{ | |||
$request['is_driver'] = "false"; | |||
} | |||
$result = array('status' => 'success','data' => $request['is_driver']); | |||
}else{ | |||
$result = array('status' => 'error'); | |||
} | |||
return $result; | |||
} | |||
public function promotions(){ | |||
$sql = "SELECT id AS promotion_id,promotion_name,image as promotion_image FROM promotions WHERE status = '1' "; | |||
$query = $this->db->query($sql); | |||
if ($query->num_rows() >= 0) { | |||
$data = $query->result(); | |||
// print_r($data); | |||
// exit; | |||
// for($i=0; $i<count($data);$i++) | |||
// { | |||
// $data[$i]->promotion_name = "promotion"; | |||
// } | |||
$result = array('status' => 'success','promotions' => $data); | |||
} | |||
else{ | |||
$result = array('status' => 'error'); | |||
} | |||
return $result; | |||
} | |||
public function popular(){ | |||
$sql = "SELECT category.id as popular_id,category.cat_name as popular_name,category.image as popular_image FROM popular JOIN category ON category.id = popular.cat_id WHERE category.status=1 ORDER BY popular.index_no ASC"; | |||
$query = $this->db->query($sql); | |||
if ($query->num_rows() >= 0) { | |||
$data = $query->result(); | |||
$result = array('status' => 'success','popular' => $data); | |||
} | |||
else{ | |||
$result = array('status' => 'error'); | |||
} | |||
return $result; | |||
} | |||
public function update_password($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$query = $this->db->query("SELECT * FROM users | |||
WHERE id = '".$id."' AND | |||
password ='".md5($request['old_password'])."'"); | |||
if(!empty($query)){ | |||
$rs = $query->row(); | |||
if($query->num_rows() <= 0){ | |||
return array('status' => 'error','message' => 'Password mismatch'); | |||
} | |||
} | |||
$query = $this->db->update('users', array('password'=>md5($request['new_password'])), | |||
array('id'=>$id)); | |||
if($query){ | |||
return array('status' => 'success'); | |||
} | |||
} | |||
return array('status' => 'error','message' => 'No data'); | |||
} | |||
public function update_phone($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
// print_r($rs);die(); | |||
$id = $rs->member_id; | |||
$data = "SELECT * FROM users WHERE id = '$id'"; | |||
$query = $this->db->query($data); | |||
$rs = $query->row(); | |||
if($query->num_rows() <= 0){ | |||
$result = array('status' => 'error','message' => 'No data'); | |||
public function checkMobAvailability($data = array()){ | |||
$res = array('status'=>'success', 'message'=>'Mobile Number Available','data'=>array('phone'=>$data['phone'],'is_available'=>true)); | |||
if(empty($data)){ | |||
$res = array('status'=>'error','error'=>'901','message'=>'Something went wrong.'); | |||
return $res; | |||
} | } | ||
else{ | $result = $this->db->get_where('customers',array('phone'=>$data['phone'],'country_code'=>$data['country_code'])); | ||
if(!empty($result) && $result->num_rows() > 0){ | |||
$phone = array( | $res=array('status'=>'error','error'=>'902','message'=>'Mobile number already in use.'); | ||
'phone' => $request['phone'] | |||
); | |||
$this->db->where('id', $id); | |||
$query = $this->db->update('users', $phone); | |||
$result = array('status' => 'success'); | |||
} | } | ||
return $res; | |||
}else{ | |||
$result = array('status' => 'error','message' => 'No data'); | |||
} | } | ||
public function checkCustomerLogin($userLogData){ | |||
return $result; | $respArr = array('status'=>0); | ||
} | if(empty($userLogData)){ | ||
return $returnStatus; | |||
public function notification_update($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if($query->num_rows() > 0){ | |||
$rs = $query->row(); | |||
$driver_id = $rs->member_id; | |||
$data = array('notification'=>$request['notification_update']); | |||
$this->db->where('id', $driver_id)->update('users', $data); | |||
$result = array('status' => 'success','data' => $request['notification_update'],); | |||
} | } | ||
else{ | $result = $this->db->get_where('customers',array('email'=>$userLogData['email'],'status'=>'1')); | ||
$result = array('status' => 'error'); | if(empty($result) || $result->num_rows() < 1 || empty($custData = $result->row())){ | ||
$respArr['status'] = 2; | |||
return $respArr; | |||
} | } | ||
return $result; | $this->db->select("customer_id as id,is_otp_verified,phone as phone_number,TRIM(CONCAT(first_name,' ' ,IFNULL(last_name,''))) as user_name"); | ||
$result = $this->db->get_where('customers',array('email'=>$userLogData['email'], | |||
} | 'password'=>$userLogData['password'], | ||
'status'=>'1')); | |||
public function get_user_info($request){ | $respArr['status'] = 3; | ||
$result = array(); | if(!empty($result) && $result->num_rows() == 1 && !empty($custData = $result->row())){ | ||
$query = $this->db->query("SELECT USR.id,USR.first_name,USR.surname,USR.phone, | $authdata = $this->insert_auth($custData->id); | ||
USR.profile_image,USR.notification,USR.email_id,DRV.profile_pic, | if($authdata){ | ||
DRV.earnings,UP.phone_verified,UP.email_verified,UP.driver_enabled, | $custData->auth_token = $authdata; | ||
UP.is_driver,UP.wallet,AP_RATE.rate AS appRate, | $respArr['data'] = $custData; | ||
DRV_RATE.rate AS drvRate | $respArr['status'] = 1; | ||
FROM users AS USR | |||
INNER JOIN auth_table AS AT ON (AT.member_id = USR.id) | |||
INNER JOIN user_profile AS UP ON (UP.users_id = USR.id) | |||
LEFT JOIN drivers AS DRV ON (DRV.users_id = USR.id AND DRV.status = '1') | |||
LEFT JOIN app_rate AS AP_RATE ON (AP_RATE.users_id = USR.id) | |||
LEFT JOIN driver_rate AS DRV_RATE ON (DRV_RATE.users_id = USR.id) | |||
WHERE AT.unique_id = '".$request['auth']."' AND USR.status = '1' | |||
GROUP BY USR.id"); | |||
if($query->num_rows() > 0){ | |||
$userData = $query->row_array(); | |||
$usrOdrCount = $this->db->query("SELECT COUNT(id) | |||
FROM orders | |||
WHERE status = '3' AND users_id = '".$userData."' | |||
GROUP BY users_id"); | |||
$drvOdrCount = $this->db->query("SELECT COUNT(id) | |||
FROM orders | |||
WHERE status = '3' AND driver_id = '".$userData."' | |||
GROUP BY status = '3' driver_id"); | |||
$usrOdrCount = (!empty($usrOdrCount))?$usrOdrCount->row_array():0; | |||
$drvOdrCount = (!empty($drvOdrCount))?$drvOdrCount->row_array():0; | |||
$userData['user_oder_count'] = (empty($usrOdrCount))?0:$usrOdrCount; | |||
$userData['driver_oder_count'] = (empty($drvOdrCount))?0:$drvOdrCount; | |||
$query = $this->db->select('AVG(NULLIF(rate,0)) as avg_rate')->where('users_id', $userData['id'])->get('user_rate'); | |||
if($query->num_rows() > 0){ | |||
$res = $query->result(); | |||
// pr($res[0]->avg_rate); | |||
$userData['appRate'] = ceil($res[0]->avg_rate); | |||
} | } | ||
$query1 = $this->db->select('AVG(NULLIF(rate,0)) as avg_rate')->where('driver_id', $userData['id'])->get('driver_rate'); | |||
if($query1->num_rows() > 0){ | |||
$res = $query1->result(); | |||
// pr($res[0]->avg_rate); | |||
$userData['drvRate'] = ceil($res[0]->avg_rate); | |||
} | } | ||
return $respArr; | |||
$respArr = array(); | |||
$respArr['is_driver'] = ($userData['is_driver'] == 1)?true:false; | |||
$respArr['is_registered_as_driver'] = ($userData['driver_enabled'] == 1)?true:false; | |||
$respArr['user']['user_id'] = $userData['id']; | |||
$respArr['user']['first_name'] = $userData['first_name']; | |||
$respArr['user']['sur_name'] = $userData['surname']; | |||
$respArr['user']['phone'] = $userData['phone']; | |||
$respArr['user']['email'] = $userData['email_id']; | |||
$respArr['user']['rating'] = $userData['appRate']; | |||
$respArr['user']['total_order'] = $userData['user_oder_count']; | |||
$respArr['user']['wallet'] = $userData['wallet']; | |||
$respArr['user']['notification'] = ($userData['notification'] == 1)?true:false; | |||
$respArr['user']['profile_photo'] = $userData['profile_image']; | |||
$respArr['driver'] = array(); | |||
if($userData['driver_enabled']){ | |||
$respArr['driver']['user_id'] = $userData['id']; | |||
$respArr['driver']['first_name'] = $userData['first_name']; | |||
$respArr['driver']['sur_name”'] = $userData['surname']; | |||
$respArr['driver']['phone'] = $userData['phone']; | |||
$respArr['driver']['email'] = $userData['email_id']; | |||
$respArr['driver']['rating'] = $userData['drvRate']; | |||
$respArr['driver']['total_order'] = $userData['driver_oder_count']; | |||
$respArr['driver']['wallet'] = $userData['wallet']; | |||
$respArr['driver']['earnings'] = $userData['earnings']; | |||
$respArr['driver']['notification'] = ($userData['notification'] == 1)?true:false; | |||
$respArr['driver']['profile_photo'] = $userData['profile_image']; | |||
} | |||
$result = array('status' => 'success', 'data' => $respArr); | |||
} | |||
else{ | |||
$result = array("status" => "error","error" => "No data","message" => "No data"); | |||
} | |||
return $result; | |||
} | |||
public function profile_edit_update($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if($query->num_rows() > 0){ | |||
$rs = $query->row(); | |||
$user_id = $rs->member_id; | |||
$this->db->where('email_id',$request['email']); | |||
$this->db->where('id!=',$user_id); | |||
$res = $this->db->get('users'); | |||
if($res->num_rows() == 0){ | |||
$data = array('first_name'=>$request['first_name'], | |||
'surname' =>$request['sur_name'], | |||
'email_id' =>$request['email'], | |||
'profile_image'=>$request['profile_photo']); | |||
$this->db->where('id', $user_id)->update('users', $data); | |||
$result = array('status' => 'success'); | |||
}else{ | |||
$result = array('status' => 'exists'); | |||
} | } | ||
}else{ | function createServiceProvider($provider_data = array()){ | ||
$result = array('status' => 'error'); | if(empty($provider_data)) | ||
} | return 0; | ||
return $result; | |||
} | |||
public function add_home_work($request){ | |||
$query = $this->db->where('unique_id',$request['auth'])->get('auth_table'); | |||
if($query->num_rows()>0){ | |||
$rs = $query->row(); | |||
if($request['type']==0){ | |||
$data = array('users_id'=>$rs->member_id,'location'=>$request['home'],'lat'=>$request['home_latitude'],'lng'=>$request['home_longitude'],'type'=>$request['type'],'status'=>'1'); | |||
}else{ | |||
$data = array('users_id'=>$rs->member_id,'location'=>$request['work'],'lat'=>$request['work_latitude'],'lng'=>$request['work_longitude'],'type'=>$request['type'],'status'=>'1'); | |||
} | |||
$this->db->insert('user_address',$data); | |||
return true; | |||
}else{ | |||
return false; | |||
} | |||
} | |||
public function location_details($request){ | |||
$query = $this->db->where('unique_id',$request['auth'])->get('auth_table'); | |||
if($query->num_rows()>0){ | |||
$rs = $query->row(); | |||
$cust_id = $rs->member_id; | |||
$data = "SELECT type,location,lat,lng FROM user_address WHERE users_id='$cust_id' AND status='1'"; | |||
$query = $this->db->query($data); | |||
$home = $work = array(); | |||
$result = $query->result_array(); | if(isset($provider_data['email']) && !empty($provider_data['email'])){ | ||
if(empty($result)){ | $emailChk = $this->db->get_where('admin_users',array('username'=>$provider_data['email'],'status !='=>'2')); | ||
return array('status' => 'success', 'data' => array('home' => $home, 'work' => $work)); | if(!empty($emailChk) && $emailChk->num_rows() > 0){ | ||
return 2; | |||
} | |||
} | } | ||
if(isset($provider_data['phone']) && !empty($provider_data['phone'])){ | |||
foreach($result AS $address){ | $phoneChk = $this->db->get_where('mechanic',array('phone'=>$provider_data['phone'])); | ||
if($address['type'] == '0'){ | if(!empty($phoneChk) && $phoneChk->num_rows() > 0){ | ||
$home[] = array('name' => $address['location'], | return 3; | ||
'latitude' =>$address['lat'], | |||
'longitude' =>$address['lng']); | |||
}else{ | |||
$work[] = array('name' => $address['location'], | |||
'latitude' =>$address['lat'], | |||
'longitude' =>$address['lng']); | |||
} | } | ||
} | } | ||
if($result){ | $status = $this->db->insert('admin_users', | ||
$result = array('status' => 'success', 'data' => array('home' => $home, 'work' => $work)); | array('username'=>$provider_data['email'], | ||
}else{ | 'password'=>md5($provider_data['password']), | ||
$result = array('status' => 'error'); | 'display_name'=>$provider_data['first_name'].' '.$provider_data['last_name'], | ||
'user_type'=>'2','status'=>'1')); | |||
if(!$status){ | |||
return 0; | |||
} | } | ||
$mechanic_id = $this->db->insert_id(); | |||
return $result; | $status = $this->db->insert('mechanic', | ||
array('mechanic_id'=>$mechanic_id, | |||
}else{ | 'city'=>'', | ||
return false; | 'phone'=>$provider_data['phone'], | ||
'state'=>'', | |||
'shop_id'=>'', | |||
'address'=>'', | |||
'licence'=>'', | |||
'location'=>'', | |||
'email_id'=>$provider_data['email'], | |||
'end_time'=>'', | |||
'last_name'=>$provider_data['last_name'], | |||
'start_time'=>'', | |||
'first_name'=>$provider_data['first_name'], | |||
'location_lat'=>'', | |||
'location_lng'=>'', | |||
'licence_number'=>'', | |||
'licence_exp_date'=>'')); | |||
return ($status)?1:0; | |||
} | |||
public function insert_auth($id){ | |||
$static_string = time(); | |||
$authToken = 'Dcarfixs'.sha1($static_string); | |||
$custData = $this->db->get_where('authtable',array('customer_id'=>$id)); | |||
if(!empty($custData) && $custData->num_rows() > 0){ | |||
$custData = $custData->row(); | |||
$authToken = $custData->authtoken; | |||
} else { | |||
$this->db->insert('authtable',array('customer_id'=>$id,'authtoken'=>$authToken)); | |||
} | } | ||
} | |||
public function user_rating($request){ | |||
$query = $this->db->where('unique_id',$request['auth'])->get('auth_table'); | return $authToken; | ||
if($query->num_rows()>0){ | } | ||
$rs = $query->row(); | |||
$cust_id = $rs->member_id; | |||
$data = array('rate'=>$request['rating'], | |||
'orders_id'=>$request['order_id'], | |||
'users_id'=>$request['user_id'], | |||
'driver_id'=>$cust_id); | |||
$res = $this->db->insert('user_rate',$data); | public function createCustomer($customer_data = array()){ | ||
$respArr = array('status'=>0); | |||
if(empty($customer_data)){ | |||
$respArr['status'] = 0; | |||
return $respArr; | |||
} | |||
if(isset($customer_data['email']) && !empty($customer_data['email'])){ | |||
$emailChk = $this->db->get_where('customers',array('email'=>$customer_data['email'],'status !='=>'2')); | |||
if(!empty($emailChk) && $emailChk->num_rows() > 0){ | |||
$respArr['status'] = 2; | |||
return $respArr; | |||
} | |||
} | |||
if(isset($customer_data['phone']) && !empty($customer_data['phone'])){ | |||
$phoneChk = $this->db->get_where('customers',array('phone'=>$customer_data['phone'],'status !='=>'2')); | |||
if(!empty($phoneChk) && $phoneChk->num_rows() > 0){ | |||
$respArr['status'] = 3; | |||
return $respArr; | |||
} | |||
} | |||
$customer_data['first_name'] = $customer_data['name']; | |||
unset($customer_data['name']); | |||
if($this->db->insert('customers',$customer_data)){ | |||
$last_id = $this->db->insert_id(); | |||
$this->db->select("TRIM(CONCAT(first_name,' ' ,IFNULL(last_name,''))) as name,customer_id as user_id"); | |||
$custData = $this->db->get_where('customers',array('customer_id'=>$last_id))->row(); | |||
$authdata = $this->insert_auth($last_id); | |||
$custData->auth_token = $authdata; | |||
$respArr['data'] = $custData; | |||
$respArr['status'] = 1; | |||
} | |||
return $respArr; | |||
} | |||
if($res){ | public function get_customer_authtoken($auth = ''){ | ||
$result = array('status' => 'success'); | $respArr = array('status'=>0,'error'=>'901','message'=>'Something Went Wrong.'); | ||
if(empty($auth)){ | |||
return $respArr; | |||
} | |||
$auth = $this->db->get_where('authtable',array('authtoken'=>$auth)); | |||
if(!empty($auth) && $auth->num_rows() >= 1 && !empty($custAuth = $auth->row_array())){ | |||
$respArr['status'] = 'success'; | |||
$respArr['data'] = $custAuth; | |||
}else{ | }else{ | ||
$result = array('status' => 'error'); | $respArr['status'] = 'error'; | ||
$respArr['error'] = '902'; | |||
$respArr['message'] = 'Authtoken is not Valid'; | |||
} | |||
return $respArr; | |||
} | } | ||
return $result; | |||
public function getBookedService($id = ''){ | |||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | |||
if(empty($id)){ | |||
return $respArr; | |||
} | |||
$this->db->select('booking_id as id,scheduled_date as date,scheduled_time as time'); | |||
$this->db->where('scheduled_date >',date('Y-m-d h:i')); | |||
$bookData = $this->db->get_where('bookings',array('customer_id'=>$id))->result_array(); | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'success'; | |||
if(!empty($bookData) && (count($bookData) > 0)){ | |||
foreach ($bookData as $key => $value) { | |||
$bookData[$key]['date'] = (string) strtotime($value['date'])*1000; | |||
$bookData[$key]['date'] = $bookData[$key]['date'].""; | |||
} | |||
$respArr['data']['booked_services'] = $bookData; | |||
}else{ | }else{ | ||
$respArr['data']['booked_services'] = []; | |||
return false; | } | ||
} | return $respArr; | ||
} | |||
} | |||
public function addVehicleDetails($postData = array(),$customer_id = ''){ | |||
public function driver_rating($request){ | $respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | ||
if(empty($postData)){ | |||
$query = $this->db->where('unique_id',$request['auth'])->get('auth_table'); | return $respArr; | ||
} | |||
if($query->num_rows()>0){ | $car_name = $postData['vehicle_year'].' '.$postData['vehicle_make'].' '.$postData['vehicle_model']; | ||
$vehJson = array( | |||
$rs = $query->row(); | 'vehicle' => $car_name, | ||
'attributes' => array( | |||
$cust_id = $rs->member_id; | 'Year' => $postData['vehicle_year'], | ||
'Make' => $postData['vehicle_make'], | |||
$data = array('rate'=>$request['rating'], | 'Trim' => $postData['vehicle_trim'], | ||
'orders_id'=>$request['order_id'], | 'Model' => $postData['vehicle_model'], | ||
'driver_id'=>$request['driver_id'], | 'Engine'=> $postData['engine_no'] | ||
'users_id'=>$cust_id); | ) | ||
); | |||
$res = $this->db->insert('driver_rate',$data); | $insert_array = array( | ||
'customer_id' => $customer_id, | |||
if($res){ | 'car_name' => $car_name, | ||
$result = array('status' => 'success'); | 'car_model' => $postData['vehicle_model'], | ||
'car_maker' => $postData['vehicle_make'], | |||
'car_loc_lat' => $postData['car_loc_lat'], | |||
'car_loc_lng' => $postData['car_loc_lng'], | |||
'car_location' => $postData['car_location'], | |||
'vehicle_data' => json_encode($vehJson), | |||
'car_model_year'=> $postData['vehicle_year'], | |||
'status' => '3' | |||
); | |||
if($this->db->insert('customer_vehicle',$insert_array)){ | |||
$last_id = $this->db->insert_id(); | |||
$book_data = array( | |||
'mileage' => $postData['mileage'], | |||
'customer_id' => $customer_id, | |||
'customer_veh_id'=> $last_id, | |||
'status' => '5' | |||
); | |||
if($this->db->insert('bookings',$book_data)){ | |||
$book_id = $this->db->insert_id(); | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'success'; | |||
$respArr['data']['booking_id'] = $book_id; | |||
return $respArr; | |||
} | |||
} | |||
return $respArr; | |||
} | |||
public function get_service_list($postData = '',$start,$per_page){ | |||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | |||
$this->db->select("issue_id as id,issue as service_name,IF(issue_image != NULL OR issue_image != '' , concat('".base_url()."',issue_image) , '') as icon"); | |||
if(!empty($postData['query'])){ | |||
$where = "issue LIKE '".$postData['query']."%'"; | |||
$this->db->where($where); | |||
} | |||
$this->db->where('status','1'); | |||
if($start != 0 || $per_page != 0){ | |||
$this->db->limit($per_page,$start); | |||
} | |||
$service = $this->db->get('issues'); | |||
if(!empty($service) && !empty($serviceData = $service->result_array())){ | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'success'; | |||
$respArr['data']= $serviceData; | |||
} | |||
return $respArr; | |||
} | |||
public function search_sub_services($postData = '',$start,$per_page){ | |||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | |||
if(!isset($postData['service_id']) && empty($postData['service_id'])){ | |||
$respArr['status'] = 1; | |||
$respArr['message'] = 'Service Id is Required'; | |||
return $respArr; | |||
} | |||
$this->db->select("issue_cat_id as id,issue_category as sub_service_name,IF(issue_cat_image != NULL OR issue_cat_image != '' , concat('".base_url()."',issue_cat_image) , '') as icon"); | |||
if(!empty($postData['query'])){ | |||
$where = "issue_category LIKE '".$postData['query']."%'"; | |||
$this->db->where($where); | |||
} | |||
if($start != 0 || $per_page != 0){ | |||
$this->db->limit($per_page,$start); | |||
} | |||
$subservice = $this->db->get_where('issues_category',array('status'=>'1','issue_id'=>$postData['service_id'])); | |||
if(!empty($subservice) && !empty($subserviceData = $subservice->result_array())){ | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'success'; | |||
$respArr['data']= $subserviceData; | |||
} | |||
return $respArr; | |||
} | |||
public function book_service($postData){ | |||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | |||
if(empty($postData)){ | |||
$respArr['message'] = 'All Field is required'; | |||
return $respArr; | |||
} | |||
$insert_array = array('cost'=>$postData['total_cost'],'mechanic_id'=>$postData['mechanic_id'],'scheduled_date'=>date('Y-m-d',$postData['date']/1000),'scheduled_time'=>$postData['time'],'issues_selected'=>json_encode($postData['service_id'])); | |||
if($this->db->update('bookings',$insert_array,array('booking_id'=>$postData['booking_id']))){ | |||
$this->db->select("bookings.scheduled_time,bookings.scheduled_date,customer_vehicle.car_model as vehicle_model,customer_vehicle.car_maker as vehicle_make,customer_vehicle.car_model_year as vehicle_year,customer_vehicle.vehicle_data,TRIM(concat(mechanic.first_name,' ',IFNULL(mechanic.last_name,''))) as mechanic_name,mechanic_shop.shop_name as mechanic_shop,mechanic.address,mechanic.phone,admin_users.profile_image as image,bookings.mileage,bookings.issues_selected"); | |||
$this->db->join('customer_vehicle','customer_vehicle.customer_veh_id = bookings.customer_veh_id'); | |||
$this->db->join('mechanic','bookings.mechanic_id = mechanic.mechanic_id'); | |||
$this->db->join('admin_users','admin_users.id = mechanic.mechanic_id'); | |||
$this->db->join('mechanic_shop','mechanic_shop.shop_id = mechanic.shop_id','left'); | |||
$mech_data = $this->db->get_where('bookings',array('booking_id'=>$postData['booking_id'])); | |||
if(!empty($mech_data) && !empty($mechanic_data = $mech_data->row_array())){ | |||
$mech_veh_data = json_decode($mechanic_data['vehicle_data']); | |||
$mechanic_data['engine_no'] = $mech_veh_data->attributes->Engine; | |||
$mechanic_data['vehicle_trim'] = $mech_veh_data->attributes->Trim; | |||
unset($mechanic_data['vehicle_data']); | |||
$mechanic_data['services'] = json_decode($mechanic_data['issues_selected']); | |||
unset($mechanic_data['issues_selected']); | |||
$mechanic_data['scheduled_date'] = strtotime($mechanic_data['scheduled_date']); | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'success'; | |||
$respArr['data'] = $mechanic_data; | |||
} | |||
} | |||
return $respArr; | |||
} | |||
public function get_booking_summary($postData = ''){ | |||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | |||
if(empty($postData['booking_id'])){ | |||
$respArr['message'] = 'Booking Id is required'; | |||
return $respArr; | |||
} | |||
$this->db->select("customer_vehicle.car_model as vehicle_model,customer_vehicle.car_maker as vehicle_make,customer_vehicle.car_model_year as vehicle_year,customer_vehicle.vehicle_data,bookings.mileage,bookings.issues_selected,bookings.custom_issue_data,bookings.mechanic_id"); | |||
$this->db->join('customer_vehicle','customer_vehicle.customer_veh_id = bookings.customer_veh_id'); | |||
$mech_data = $this->db->get_where('bookings',array('booking_id'=>$postData['booking_id'])); | |||
if(!empty($mech_data) && !empty($mechanic_data = $mech_data->row_array())){ | |||
$mech_veh_data = json_decode($mechanic_data['vehicle_data']); | |||
$mechanic_data['engine_no'] = $mech_veh_data->attributes->Engine; | |||
$mechanic_data['vehicle_trim'] = $mech_veh_data->attributes->Trim; | |||
unset($mechanic_data['vehicle_data']); | |||
$mechanic_data['services'] = json_decode($mechanic_data['issues_selected']); | |||
if(!empty($mechanic_data['services'])){ | |||
foreach($mechanic_data['services'] as $key => $value){ | |||
$sql = "SELECT IC.*, MI.custom_description, MI.custom_service_fee | |||
FROM issues_category AS IC | |||
LEFT JOIN mechanic_issues AS MI ON (MI.issue_cat_id=IC.issue_cat_id AND | |||
MI.mechanic_id='".$mechanic_data['mechanic_id']."' AND MI.status='1') | |||
WHERE IC.status='1' AND IC.issue_cat_id='".$value->sub_issue_id."'"; | |||
$issue_data = $this->db->query($sql)->row(); | |||
if(!empty($issue_data)){ | |||
if($issue_data->custom_description != '' && $issue_data->custom_service_fee != ''){ | |||
$mechanic_data['services'][$key]->description = $issue_data->custom_description; | |||
$mechanic_data['services'][$key]->service_fee = $issue_data->custom_service_fee; | |||
}else{ | }else{ | ||
$result = array('status' => 'error'); | $mechanic_data['services'][$key]->description = $issue_data->default_description; | ||
$mechanic_data['services'][$key]->service_fee = $issue_data->default_service_fee; | |||
} | |||
} | |||
} | } | ||
return $result; | |||
}else{ | }else{ | ||
$mechanic_data['services'] = []; | |||
return false; | |||
} | } | ||
unset($mechanic_data['issues_selected']); | |||
$issue_data = json_decode($mechanic_data['custom_issue_data']); | |||
} | $mechanic_data['optional_images'][] = (isset($issue_data->optionalImages))?$issue_data->optionalImages:''; | ||
$mechanic_data['optional_video'][] = (isset($issue_data->optionalVideos))?$issue_data->optionalVideos:''; | |||
public function app_rating($request){ | $mechanic_data['booking_description'] = (isset($issue_data->optionlaDescription))?$issue_data->optionlaDescription:''; | ||
unset($mechanic_data['custom_issue_data']); | |||
$respArr['status'] = 'success'; | |||
$query = $this->db->where('unique_id',$request['auth'])->get('auth_table'); | $respArr['message'] = 'success'; | ||
$respArr['data'] = $mechanic_data; | |||
if($query->num_rows()>0){ | } | ||
return $respArr; | |||
$rs = $query->row(); | |||
$cust_id = $rs->member_id; | |||
$data = array('rate'=>$request['rating'], | |||
'comments'=>$request['feedback'], | |||
'users_id'=>$cust_id); | |||
$res = $this->db->insert('app_rate',$data); | |||
if($res){ | |||
$result = array('status' => 'success'); | |||
}else{ | |||
$result = array('status' => 'error'); | |||
} | } | ||
return $result; | |||
public function getNearMechanics($postData = '',$start,$per_page){ | |||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.'); | |||
if(empty($postData)){ | |||
return $respArr; | |||
} | |||
$current_lat = $postData['location_lat']; | |||
$current_lng = $postData['location_lng']; | |||
$issue_cat_id = $postData['service_id']; | |||
if($start != 0 || $per_page != 0){ | |||
$limt = "limit ".$start.",".$per_page; | |||
}else{ | }else{ | ||
$limt = ""; | |||
return false; | } | ||
$sql = "SELECT AU.display_name,AU.profile_image,ME.*,MS.shop_name,MS.address AS shop_address, | |||
MS.phone AS shop_phone,MS.email_id AS shop_email_id, | |||
3956*2*ASIN(SQRT(POWER(SIN(($current_lat-ME.location_lat)*pi()/180/2),2)+ | |||
COS($current_lat*pi()/180 )*COS(ME.location_lat*pi()/180)* | |||
POWER(SIN(($current_lng-ME.location_lng)*pi()/180/2),2) )) AS distance | |||
FROM mechanic AS ME | |||
INNER JOIN admin_users AS AU ON (AU.id=ME.mechanic_id) | |||
LEFT JOIN mechanic_shop AS MS ON (MS.shop_id=ME.shop_id AND MS.status='1') | |||
WHERE AU.status='1' | |||
-- HAVING distance<30 | |||
".$limt; | |||
$mechData = $this->db->query($sql); | |||
if(empty($mechData) || empty($mechData = $mechData->result_array())){ | |||
return 0; | |||
} | } | ||
$estimate = 0; | |||
} | $mechDataArr = array(); | ||
foreach($mechData AS $index => $data){ | |||
function get_last_order($user_data = array()){ | if(empty($data['start_time']) || empty($data['end_time'])){ | ||
$result = array('status' => 'error'); | $scheduleTiming = array('09:00 AM','10:00 AM','11:00 AM','12:00 PM','01:00 PM', | ||
'02:00 PM','03:00 PM','04:00 PM','05:00 PM','06:00 PM'); | |||
if(empty($user_data)){ | } else { | ||
return $result; | $endTime = strtotime($data['end_time']); | ||
} | $schTime = strtotime($data['start_time']); | ||
$query = $this->db->where('unique_id',$user_data['auth'])->get('auth_table')->row(); | $scheduleTiming = array(); | ||
if(empty($query)){ | for( ; $schTime <= ($endTime-3600) ; $schTime += 3600){ | ||
return $result; | $scheduleTiming[] = date('h:i A',$schTime); | ||
} | } | ||
$user_id = $query->member_id; | } | ||
$query = $this->db->query("SELECT ODR.* ,DR_RATE.id AS rateId, USR.first_name, | |||
USR.surname,USR.profile_image | $rating = $this->db->query("SELECT round(avg(rate),2) AS rating | ||
FROM orders AS ODR | FROM mechanic_rating | ||
LEFT JOIN driver_rate AS DR_RATE ON (DR_RATE.orders_id = ODR.id) | WHERE mechanic_id='".$data['mechanic_id']."'"); | ||
INNER JOIN users AS USR ON (USR.id = ODR.driver_id) | $rating = (!empty($rating) && !empty($rating = $rating->row_array()))?$rating['rating']:'0'; | ||
WHERE ODR.status = '3' AND ODR.users_id = '".$user_id."' | |||
ORDER BY ODR.id DESC LIMIT 1")->row_array(); | $mechanic_id = $data['mechanic_id']; | ||
if(empty($query)){ | $sql = "SELECT ISS.*, IC.*, MI.mechanic_id, MI.custom_description, MI.custom_service_fee | ||
$result['message'] = 'No Data'; | FROM issues_category AS IC | ||
} | INNER JOIN issues AS ISS ON (IC.issue_id=ISS.issue_id) | ||
$orderData = array(); | LEFT JOIN mechanic_issues AS MI ON (MI.issue_cat_id=IC.issue_cat_id AND | ||
$orderData['status'] = 'success'; | MI.mechanic_id='$mechanic_id' AND MI.status='1') | ||
$orderData['data']['is_last_order_rated'] = (!empty($query['rateId']))?true:false; | WHERE ISS.status='1' AND IC.status='1' AND IC.issue_cat_id IN ($issue_cat_id)"; | ||
$orderData['data']['order_id'] = $query['id']; | |||
$orderData['data']['driver_id'] = $query['driver_id']; | $subIssData = $this->db->query($sql); | ||
$orderData['data']['driver_name'] = $query['first_name'].' '.$query['surname']; | $sIssueData = array(); | ||
$orderData['data']['amount'] = $query['amount']; | if(!empty($subIssData) && !empty($subIssData = $subIssData->result_array())){ | ||
$orderData['data']['date'] = strtotime($query['date'].' '.$query['time']); | $sIssueData = $subIssData; | ||
$orderData['data']['shop_name'] = $query['shop_name']; | } | ||
$orderData['data']['driver_photo'] = $query['profile_image']; | $estimate = 0; | ||
$orderData['data']['item_name'] = $query['order_desc']; | foreach($sIssueData AS $sIndex => $sIssue){ | ||
$orderData['data']['item_quantity'] = ''; | if(!empty($sIssue['custom_service_fee'])){ | ||
$estimate += $sIssue['custom_service_fee']; | |||
return $orderData; | $sIssueData[$sIndex]['service_fee'] = $sIssue['custom_service_fee']; | ||
} | } else { | ||
$estimate += $sIssue['default_service_fee']; | |||
function get_last_order_driver($user_data = array()){ | $sIssueData[$sIndex]['service_fee'] = $sIssue['default_service_fee']; | ||
$result = array('status' => 'error'); | |||
if(empty($user_data)){ | |||
return $result; | |||
} | |||
$query = $this->db->where('unique_id',$user_data['auth'])->get('auth_table')->row(); | |||
if(empty($query)){ | |||
return $result; | |||
} | |||
$user_id = $query->member_id; | |||
$query = $this->db->query("SELECT ODR.* ,DR_RATE.id AS rateId, USR.first_name, | |||
USR.surname,USR.profile_image | |||
FROM orders AS ODR | |||
LEFT JOIN driver_rate AS DR_RATE ON (DR_RATE.orders_id = ODR.id) | |||
INNER JOIN users AS USR ON (USR.id = ODR.users_id) | |||
WHERE ODR.status = '3' AND ODR.driver_id = '".$user_id."' | |||
ORDER BY ODR.id DESC LIMIT 1")->row_array(); | |||
if(empty($query)){ | |||
$result['message'] = 'No Data'; | |||
} | |||
$orderData = array(); | |||
$orderData['status'] = 'success'; | |||
$orderData['data']['is_last_order_rated'] = (!empty($query['rateId']))?true:false; | |||
$orderData['data']['order_id'] = $query['id']; | |||
$orderData['data']['driver_id'] = $query['driver_id']; | |||
$orderData['data']['driver_name'] = $query['first_name'].' '.$query['surname']; | |||
$orderData['data']['amount'] = $query['amount']; | |||
$orderData['data']['date'] = strtotime($query['date'].' '.$query['time']); | |||
$orderData['data']['shop_name'] = $query['shop_name']; | |||
$orderData['data']['driver_photo'] = $query['profile_image']; | |||
$orderData['data']['item_name'] = $query['order_desc']; | |||
$orderData['data']['item_quantity'] = ''; | |||
return $orderData; | |||
} | |||
public function request_cancel($request = array()){ | |||
if(empty($request) || !isset($request['id'],$request['auth']) || empty($request['id']) || empty($request['auth'])){ | |||
return array('status'=>'error','message'=>'No data'); | |||
} | } | ||
$user_id = $this->getUserId($request['auth']); | |||
if(empty($user_id)){ | |||
return array('status'=>'error'); | |||
} | } | ||
$query1 = $this->db->where('id',$request['id'])->get('orders')->row(); | $mechData[$index]['rating'] = $rating; | ||
$request_id = $query1->req_id; | $mechData[$index]['estimate'] = $estimate; | ||
$update_request_status = $this->db->update('request',array('status'=>'2'),array('id'=>$request_id)); | $mechData[$index]['sub_issues'] = $sIssueData; | ||
$mechData[$index]['scheduleTiming'] = $scheduleTiming; | |||
$query = $this->db->update('orders',array('status'=>'3'), array('id'=>$request['id'])); | $respArr['status'] = 'success'; | ||
// $query = $this->db->update('request',array('status'=>'2'), array('id'=>$request['id'])); | $respArr['message'] = 'success'; | ||
if ($query) { | $respArr['data'] = $mechData; | ||
return array('status' => 'success','message' => 'Successfully Cancelled..!!'); | |||
} | } | ||
return array('status'=>'error'); | return $respArr; | ||
} | |||
public function request_status($request = array()){ | |||
if(empty($request) || !isset($request['id'],$request['auth']) || empty($request['id']) || empty($request['auth'])){ | |||
return array('status'=>'error','message'=>'No data'); | |||
} | |||
$user_id = $this->getUserId($request['auth']); | |||
if(empty($user_id)){ | |||
return array('status'=>'error'); | |||
} | |||
$query = $this->db->query("SELECT ODR.delivery_fee,ODR.id,REQ.status | |||
FROM request AS REQ | |||
LEFT JOIN orders AS ODR ON (ODR.req_id = REQ.id) | |||
WHERE REQ.id = '".$request['id']."'")->row_array(); | |||
if (empty($query)) { | |||
return array('status' => 'error','message'); | |||
} | |||
$status = $query['status']; | |||
switch($status){ | |||
case 0: | |||
return array("status"=>"success","data"=>array("request_status"=>"0")); | |||
case 1: | |||
return array("status"=>"success", | |||
"data"=>array("request_status"=>"1", | |||
"delivery_fee"=>$query['delivery_fee'], | |||
"order_id"=>$query['id'])); | |||
case 2: | |||
return array("status"=>"success","data"=>array("request_status"=>"2")); | |||
} | } | ||
} | |||
function tracking_details($request = array()){ | public function add_service_details($postData){ | ||
if(empty($request) || !isset($request['order_id'],$request['auth']) || empty($request['order_id']) || empty($request['auth'])){ | $respArr = array('status'=>'error','message'=>'Something Went Wrong'); | ||
return array('status'=>'error','message'=>'No data'); | if(empty($postData['booking_id'])){ | ||
$respArr['message'] = 'Booking Id is Required'; | |||
return $respArr; | |||
} | |||
$custom_issue_data = array( | |||
'optionlaDescription'=>(isset($postData['description']) && !empty($postData['description']))?$postData['description']:"", | |||
'optionalImages'=>(isset($postData['image']) && !empty($postData['image']))?$postData['image']:[], | |||
'optionalVideos'=>(isset($postData['video']) && !empty($postData['video']))?$postData['video']:[], | |||
); | |||
if($this->db->update('bookings',array('custom_issue_data'=>json_encode($custom_issue_data)),array('booking_id'=>$postData['booking_id']))){ | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'success'; | |||
return $respArr; | |||
} | } | ||
$user_id = $this->getUserId($request['auth']); | |||
if(empty($user_id)){ | |||
return array('status'=>'error'); | |||
} | } | ||
$data = $this->db->query("SELECT ODR.*,ODR.delivery_lat AS lat,ODR.delivery_lng AS lng, | public function remove_booking($postData = array()){ | ||
DRV.profile_pic,USR.phone,DRV.driver_lat,DRV.driver_lng | $respArr = array('status'=>'error','message'=>'Something Went Wrong..!'); | ||
FROM orders AS ODR | if(empty($postData['booking_id'])){ | ||
INNER JOIN users AS USR ON (USR.id = ODR.driver_id) | $respArr['message'] = 'Booking Id is Required'; | ||
INNER JOIN drivers AS DRV ON (DRV.users_id = ODR.driver_id) | return $respArr; | ||
WHERE ODR.id='".$request['order_id']."' AND USR.status = '1' AND DRV.status = '1'")->row_array(); | }else if(empty($postData['service_id'])){ | ||
if(!empty($data)){ | $respArr['message'] = 'Service Id is Required'; | ||
return array('status'=>'success','orderData'=>$data); | return $respArr; | ||
} | |||
return array('status'=>'error'); | |||
} | |||
function getUserId($auth = ''){ | |||
if(empty($auth)){ | |||
return; | |||
} | } | ||
$query = $this->db->where('unique_id',$auth)->get('auth_table')->row(); | $booked_data = $this->db->get_where('bookings',array('booking_id'=>$postData['booking_id'])); | ||
if(empty($query)){ | if(!empty($booked_data) && !empty($booked_data = $booked_data->row_array())){ | ||
return; | $issues_selected = json_decode($booked_data['issues_selected']); | ||
foreach($issues_selected as $key => $value){ | |||
if($value->sub_issue_id == $postData['service_id']){ | |||
unset($issues_selected[$key]); | |||
} | } | ||
return $query->member_id; | |||
} | |||
function geySysSettings(){ | |||
$data = $this->db->get('setting')->row(); | |||
if(!empty($data)){ | |||
return $data; | |||
} | } | ||
return 0; | $issues_selected = array_values($issues_selected); | ||
} | if($this->db->update('bookings',array('issues_selected'=>json_encode($issues_selected)),array('booking_id'=>$postData['booking_id']))){ | ||
$respArr['status'] = 'success'; | |||
function orders_list($request = array()){ | $respArr['message'] ='success'; | ||
$data = $this->geySysSettings(); | |||
$google_key = $data->google_api_key; | |||
if(empty($request) || !isset($request['auth']) || empty($request['auth'])){ | |||
return array('status'=>'error','message'=>'No data'); | |||
} | } | ||
$user_id = $this->getUserId($request['auth']); | return $respArr; | ||
if(empty($user_id)){ | |||
return array('status'=>'error'); | |||
} | } | ||
$isDriver = $this->db->select('is_driver')->where(array('users_id'=>$user_id))->get('user_profile')->row_array(); | |||
$isDriver = (!empty($isDriver) && isset($isDriver['is_driver']))?$isDriver['is_driver']:'0'; | |||
$limit_offset = '10'; | |||
$page_no = (isset($request['page_no']) && !empty($request['page_no']))?$request['page_no']:1; | |||
if($page_no != 1){ | |||
$limit_offset = ($page_no-1).'0,10'; | |||
} | |||
$count = ''; | |||
$query = ''; | |||
if($isDriver == '0'){ | |||
$count = $this->db->get_where('orders',array('users_id'=>$user_id)); | |||
$count = (!empty($count))?$count->num_rows():0; | |||
$query = $this->db->query("SELECT ODR.*,USR.first_name,USR.surname,USR.profile_image | |||
FROM orders AS ODR | |||
INNER JOIN users AS USR ON (USR.id = ODR.users_id) | |||
WHERE ODR.users_id='".$user_id."' AND USR.status = '1' ORDER BY ODR.id DESC | |||
LIMIT ".$limit_offset)->result_array(); | |||
} else { | |||
$count = $this->db->get_where('orders',array('driver_id'=>$user_id)); | |||
$count = (!empty($count))?$count->num_rows():0; | |||
$query = $this->db->query("SELECT ODR.*,USR.first_name,USR.surname,DRV.profile_pic AS profile_image | |||
FROM orders AS ODR | |||
INNER JOIN users AS USR ON (USR.id = ODR.driver_id) | |||
INNER JOIN drivers AS DRV ON (DRV.users_id = ODR.driver_id) | |||
WHERE ODR.driver_id='".$user_id."' AND USR.status = '1' AND DRV.status = '1' | |||
ORDER BY ODR.id DESC LIMIT ".$limit_offset)->result_array(); | |||
} | |||
$orderData = array(); | |||
foreach($query AS $order){ | |||
$shopData = file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?place_id=".$order['shop_id']."&key=".$google_key); | |||
if(empty($shopData)){ | |||
continue; | |||
} | |||
switch ($order['status']) { | |||
case '1': | |||
$order['status'] = '2'; | |||
break; | |||
case '2': | |||
$order['status'] = '3'; | |||
break; | |||
case '3': | |||
$order['status'] = '4'; | |||
break; | |||
} | } | ||
$shopData = json_decode($shopData,true); | public function get_service($postData = array()){ | ||
$respArr = array('status'=>'error','message'=>'Something went Wrong.. Try Again'); | |||
$details['order_id'] = $order['id']; | if(empty($postData['booking_id'])){ | ||
$details['type'] = $isDriver; | $respArr['message'] = 'Booking Id is Required'; | ||
$details['name'] = $order['first_name'].' '.$order['surname']; | return $respArr; | ||
$details['amount'] = $order['price']; | |||
$details['delivery_mode'] = $order['delivery_mode']; | |||
$details['date'] = strtotime($order['date'].' '.$order['time']); | |||
$details['shop_name'] = $order['shop_name']; | |||
$details['address'] = $shopData['results'][0]['formatted_address']; | |||
$details['shop_subname'] = $order['shop_name']; | |||
$details['photo'] = $order['profile_image']; | |||
$details['order_status'] = $order['status']; | |||
$details['receipt_amount'] = $order['receipt_amount']; | |||
$details['total_amount'] = $order['amount']; | |||
$details['delivery_charge'] = $order['delivery_fee']; | |||
$details['item_name'] = $order['order_desc']; | |||
$orderData[] = $details; | |||
} | } | ||
$tot_page = ceil($count/10); | $booked_data = $this->db->get_where('bookings',array('booking_id'=>$postData['booking_id'])); | ||
return array('status'=>'success','data'=>array('orders_list'=>$orderData),'meta'=>array('total_pages'=>$tot_page,'total'=>$count,'current_page'=>$page_no,'per_page'=>'10')); | if(!empty($booked_data) && !empty($booked_data = $booked_data->row_array())){ | ||
$respArr['status'] = 'success'; | |||
} | $respArr['message'] = 'success'; | ||
$respArr['data']['services'] = json_decode($booked_data['issues_selected']); | |||
function issuing_receipt($request = array()){ | |||
if(empty($request) || !isset($request['auth']) || empty($request['auth'])){ | |||
return array('status'=>'error','message'=>'No data'); | |||
} | } | ||
$user_id = $this->getUserId($request['auth']); | return $respArr; | ||
if(empty($user_id)){ | |||
return array('status'=>'error'); | |||
} | } | ||
$status = $this->db->update('orders', array('price'=>$request['receipt_amount'],'amount'=>$request['total_amount'],'delivery_fee'=>$request['delivery_fee'],'receipt_photo'=>$request['receipt_photo'],), array('id'=>$request['order_id'])); | public function rate_mechanic($auth,$postData){ | ||
if($status){ | $respArr = array('status'=>'error','message'=>'Something went Wrong.. Try Again'); | ||
return array('status'=>'success'); | if(empty($postData['rate'])){ | ||
$respArr['message'] = 'Rating is Required'; | |||
return $respArr; | |||
} | } | ||
return array('status'=>'error'); | if(empty($postData['mechanic_id'])){ | ||
} | $respArr['message'] = 'Mechanic Id is Required'; | ||
return $respArr; | |||
function request_order($request = array()){ | |||
if(empty($request) || !isset($request['auth']) || empty($request['auth'])){ | |||
return array('status'=>'error','message'=>'No data'); | |||
} | } | ||
$user_id = $this->getUserId($request['auth']); | if(empty($postData['description'])){ | ||
if(empty($user_id)){ | $respArr['message'] = 'Description is Required'; | ||
return array('status'=>'error'); | return $respArr; | ||
} | } | ||
$status = $this->db->insert('request',array('users_id'=>$user_id,'delivery_location'=>$request['location_name'],'delivery_lat'=>$request['delivery_latitude'],'delivery_lng'=>$request['delivery_longitude'],'shop_id'=>$request['shop_id'],'shop_name'=>$request['shop_name'],'item_name'=>$request['item_name'],'date'=>date('Y-m-d'),'time'=>date('h:i:s'),'delivery_mode'=>$request['delivery_mode'],'status'=>'0')); | $mechRate = $this->db->get_where('mechanic_rating',array('customer_id'=>$postData['customer_id'],'mechanic_id'=>$postData['mechanic_id'])); | ||
if(!empty($mechRate) && !empty($mechRate = $booked_data->row_array())){ | |||
$requested_id = $this->db->insert_id(); | $respArr['message'] = 'Sorry, You are already Rated for this mechanic'; | ||
return $respArr; | |||
$order = $this->db->insert('orders',array('users_id'=>$user_id,'req_id'=>$requested_id,'delivery_location'=>$request['location_name'],'delivery_lat'=>$request['delivery_latitude'],'delivery_lng'=>$request['delivery_longitude'],'shop_id'=>$request['shop_id'],'shop_name'=>$request['shop_name'],'item_name'=>$request['item_name'],'date'=>date('Y-m-d'),'time'=>date('h:i:s'),'delivery_mode'=>$request['delivery_mode'],'status'=>'0')); | |||
if($status){ | |||
return array('status'=>'success'); | |||
} | } | ||
return array('status'=>'error'); | $postData['status'] = '1'; | ||
} | if($this->db->insert('mechanic_rating',$postData)){ | ||
$respArr['status'] = 'success'; | |||
public function chat_file_upload($request){ | $respArr['message'] = 'success'; | ||
} | |||
return $respArr; | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$data = array('chat_list_id' => $request['chat_list_id'], | |||
'chat_id' => $request['chat_id'], | |||
'type' => $request['type'], | |||
'file' => $request['doc']); | |||
$this->db->insert('chat_history',$data); | |||
$result = array('status' => 'success','data'=>array('chat_list_id'=>$request['chat_list_id'],'chat_id'=>$request['chat_id'],'file'=>$request['doc'])); | |||
} else{ | |||
$result = array('status' => 'error'); | |||
} | } | ||
return $result; | public function acceptMechanicQuote($postData){ | ||
} | $respArr = array('status'=>'error','message'=>'Something went Wrong.. Try Again'); | ||
if(empty($postData['bookingId'])){ | |||
function set_user_recent_chat($request = array()){ | $respArr['message'] = 'Booking Id is Required'; | ||
if(empty($request) || !isset($request['auth']) || empty($request['auth'])){ | return $respArr; | ||
return array('status'=>'error','message'=>'No data'); | |||
} | } | ||
$user_id = $this->getUserId($request['auth']); | if(empty($postData['mechanicId'])){ | ||
if(empty($user_id)){ | $respArr['message'] = 'Mechanic Id is Required'; | ||
return array('status'=>'error'); | return $respArr; | ||
} | } | ||
$status = $this->db->insert('chat',array('chat_list_id'=>$request['chat_list_id'],'user_id'=>$request['user_id'],'driver_id'=>$request['driver_id'],'sender_id'=>$request['sender_id'],'type'=>$request['type'],'message'=>$request['message'],'photo_url'=>$request['photo_url'],'video_url'=>$request['video_url'],'order_id'=>$request['order_id'],'time'=>$request['time'])); | if(empty($postData['amount'])){ | ||
if($status){ | $respArr['message'] = 'Amount is Required'; | ||
return array('status'=>'success'); | return $respArr; | ||
} | } | ||
return array('status'=>'error'); | |||
} | |||
function request_trigger(){ | |||
$data = $this->geySysSettings(); | |||
$google_key = $data->google_api_key; | |||
$newTime = date("Y-m-d H:i:s",strtotime(date("Y-m-d H:i:s")." -1 minutes")); | |||
$sql = "SELECT REQ.id FROM request AS REQ | if($this->db->update('mechanic_booking',array('status'=>'1'),array('booking_id'=>$postData['bookingId'],'mechanic_id'=>$postData['mechanicId']))){ | ||
LEFT JOIN rider_state AS RS ON (RS.req_id = REQ.id AND RS.assigned_time <= '".$newTime."') | $this->db->update('mechanic_booking',array('status'=>'2'),array('booking_id'=>$postData['bookingId'],'mechanic_id !='=>$postData['mechanicId'])); | ||
WHERE REQ.status IN (0,2,3)"; | $this->db->update('bookings',array('status'=>'5','cost'=>$postData['amount']),array('booking_id'=>$postData['bookingId'])); | ||
$data = $this->db->query($sql); | |||
if(empty($data)){ | |||
return; | |||
} | } | ||
$data = $data->result_array(); | $book_data = $this->db->get_where('bookings',array('booking_id'=>$postData['bookingId']))->row(); | ||
$transaction_array = array( | |||
foreach($data as $id){ | 'customer_id'=>$book_data->customer_id, | ||
$reqData = $this->db->query("SELECT REQ.shop_id,GROUP_CONCAT(RS.driver_id) AS driver_id, | 'booking_id'=>$postData['bookingId'], | ||
REQ.users_id | 'datetime'=>date('Y-m-d h:i:s'), | ||
FROM request AS REQ | 'amount'=>$postData['amount'] | ||
LEFT JOIN rider_state AS RS ON (RS.req_id = REQ.id) | ); | ||
WHERE REQ.id = '".$id['id']."'")->row_array(); | $this->db->insert('transaction',$transaction_array); | ||
if(empty($reqData) || empty($reqData['shop_id'])){ | |||
continue; | |||
} | |||
$shopData = file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?place_id=".$reqData['shop_id']."&key=".$google_key); | |||
if(empty($shopData)){ | |||
continue; | |||
} | |||
$shopData = json_decode($shopData,true); | |||
$shopLoc = $shopData['results'][0]['geometry']['location']; | |||
$user_id = (!empty($reqData['users_id']))?$reqData['users_id']:''; | |||
$drvCond = (!empty($reqData['driver_id']))?' AND driver.users_id NOT IN ('.$reqData['driver_id'].','.$user_id.')':' AND driver.users_id NOT IN ('.$user_id.')'; | |||
$lat = $shopLoc['lat']; | |||
$lng = $shopLoc['lng']; | |||
$rideData = $this->db->query("SELECT driver.users_id, 3956 * 2 * ASIN(SQRT(POWER(SIN(($lat - driver.driver_lat) * pi()/180 / 2), 2)+ COS($lat * pi()/180 ) * COS(driver.driver_lat * pi()/180)* POWER(SIN(($lng - driver.driver_lng) * pi()/180 / 2), 2) )) as distance, UP.fcm_token AS fcm_token | |||
FROM drivers AS driver | |||
LEFT JOIN user_profile AS UP ON (UP.users_id = driver.users_id) | |||
WHERE driver.status = '1' AND UP.driver_enabled = '1' AND | |||
UP.is_driver = '1' $drvCond | |||
GROUP BY driver.users_id HAVING distance < 25 | |||
ORDER BY distance ASC LIMIT 0,1")->row_array(); | |||
if(empty($rideData) || !isset($rideData['users_id']) || empty($rideData['users_id'])){ | $respArr['data'] = $this->db->insert_id(); | ||
continue; | $respArr['status'] = 'success'; | ||
$respArr['message'] = 'Updated Successfully'; | |||
return $respArr; | |||
} | } | ||
$this->db->insert('rider_state', array('driver_id'=>$rideData['users_id'],'req_id'=>$id['id'], | |||
'assigned_time'=>date('Y-m-d h:i:s'))); | |||
$fcm_data = array('id'=>$id['id'],'title'=>'WAAW','message'=>'Delivery Request'); | public function getMechAmount($transId){ | ||
$this->push_sent_cancel($rideData['fcm_token'], $fcm_data); | $respArr = array('status'=>'error'); | ||
if(empty($transId)){ | |||
return $respArr; | |||
} | } | ||
return; | $result = $this->db->get_where('transaction',array('id'=>$transId)); | ||
} | if(!empty($result) && $result->num_rows() > 0){ | ||
$result = $result->row_array(); | |||
function get_recent_chat_list($request = array()){ | $respArr['status'] = 'success'; | ||
if(empty($request) || !isset($request['auth']) || empty($request['auth'])){ | $respArr['data'] = $result; | ||
return array('status'=>'error','message'=>'No data'); | } | ||
} | $custData = $this->db->get_where('customers',array('customer_id'=>$result['customer_id']))->row(); | ||
$user_id = $this->getUserId($request['auth']); | $respArr['emailId'] = $custData->email; | ||
if(empty($user_id)){ | return $respArr; | ||
return array('status'=>'error'); | |||
} | |||
$limit_offset = '10'; | |||
$page_no = (isset($request['page']) && !empty($request['page']))?$request['page']:1; | |||
if($page_no != 1){ | |||
$limit_offset = ($page_no-1).'0,10'; | |||
} | |||
// $resultData = $this->db->query(" | |||
// SELECT CH.*, ORD.status AS order_status FROM chat AS CH | |||
// LEFT JOIN orders AS ORD ON (ORD.id = CH.order_id) | |||
// WHERE CH.user_id = '".$user_id."' LIMIT ".$limit_offset)->result_array(); | |||
$resultData = $this->db->query(" | |||
SELECT CH.*, ORD.status AS order_status FROM chat AS CH | |||
INNER JOIN orders AS ORD ON (ORD.id = CH.order_id) | |||
WHERE ORD.status IN (1) | |||
LIMIT ".$limit_offset)->result_array(); | |||
$chatData = array(); | |||
$user_data = array(); | |||
$chkUserData = 0; | |||
foreach($resultData AS $data){ | |||
if($chkUserData == 0){ | |||
$user = $this->db->get_where('users',array('id'=>$data['user_id']))->row_array(); | |||
if(empty($user)){ | |||
continue; | |||
} | |||
$user_data['user_name'] = $user['first_name'].' '.$user['surname']; | |||
$user_data['user_photo'] = $user['profile_image']; | |||
$user = $this->db->query("SELECT DRV.profile_pic,USR.first_name,USR.surname | |||
FROM users AS USR | |||
INNER JOIN drivers AS DRV ON (DRV.users_id = USR.id) | |||
WHERE USR.id='".$data['driver_id']."'")->row_array(); | |||
if(empty($user)){ | |||
continue; | |||
} | |||
$user_data['driver_name'] = $user['first_name'].' '.$user['surname']; | |||
$user_data['driver_photo'] = $user['profile_pic']; | |||
$chkUserData = 1; | |||
} | |||
$chatData['type'] = $data['type']; | |||
$chatData['time'] = $data['time']; | |||
$chatData['chat_id'] = $data['chat_id']; | |||
$chatData['user_id'] = $data['user_id']; | |||
$chatData['order_id'] = $data['order_id']; | |||
$chatData['driver_id'] = $data['driver_id']; | |||
$chatData['message'] = $data['message']; | |||
$chatData['photo_url'] = $data['photo_url']; | |||
$chatData['video_url'] = $data['video_url']; | |||
$chatData['sender_id'] = $data['sender_id']; | |||
$chatData['order_status'] = $data['order_status']; | |||
$chatData['user_name'] = $user_data['user_name']; | |||
$chatData['user_photo'] = $user_data['user_photo']; | |||
$chatData['driver_name'] = $user_data['driver_name']; | |||
$chatData['driver_photo'] = $user_data['driver_photo']; | |||
} | } | ||
return array("status"=>"success","data"=>array('recent_chats'=>array($chatData))); | |||
} | |||
public function request_details($request){ | |||
$data = $this->geySysSettings(); | |||
$google_key = $data->google_api_key; | |||
$rs2 = $this->db->query("SELECT REQ_TB.* ,USERS_TB.id AS userid, USERS_TB.profile_image AS user_photo,USERS_TB.first_name,USERS_TB.surname, USERS_TB.phone AS user_phone_number | |||
FROM request AS REQ_TB | |||
JOIN users AS USERS_TB ON (USERS_TB.id = REQ_TB.users_id) | |||
WHERE REQ_TB.id = '".$request['request_id']."'")->row(); | |||
if(!empty($rs2)){ | |||
$shopData = file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?place_id=".$rs2->shop_id."&key=".$google_key); | |||
if(empty($shopData)){ | |||
return array('status'=>'error'); | |||
} | |||
$shopData = json_decode($shopData,true); | |||
// print_r($shopData); | |||
// die(); | |||
$shopLoc = $shopData['results'][0]['geometry']['location']; | |||
$shopAddress = $shopData['results'][0]['formatted_address']; | |||
$milliseconds = round(microtime(true) * 1000); | |||
$data = array('request_id' => $rs2->id, | |||
'shop_name' =>$rs2->shop_name, | |||
'shop_address'=>$shopAddress, | |||
'user_phone_number' =>$rs2->user_phone_number, | |||
'user_photo' => $rs2->user_photo, | |||
'shop_latitude' =>$shopLoc['lat'], | |||
'shop_longitude' =>$lng = $shopLoc['lng'], | |||
'delivery_latitude'=>$rs2->delivery_lat, | |||
'delivery_longitude'=>$rs2->delivery_lng, | |||
'request_time' => $milliseconds, | |||
'user_id' => $rs2->users_id, | |||
'user_name' => $rs2->first_name.' '.$rs2->surname); | |||
$result = array('status' => 'success','user' => $data); | public function transactionResp($transId,$result,$payfor){ | ||
$status = 0; | |||
if($result['data']['status'] == 'success'){ | |||
$status = 1; | |||
} | |||
$odr_status = 9; | |||
if($result['data']['status'] == 'success' && $payfor == '2'){ | |||
$odr_status = 2; | |||
} | |||
$this->db->update('transaction',array('transaction_response'=>json_encode($result),'transaction_reference'=>$result['data']['id'],'status'=>$status),array('id'=>$transId)); | |||
$bookData = $this->db->get_where('transaction',array('id'=>$transId))->row(); | |||
$this->db->update('bookings',array('status'=>'1'),array('booking_id'=>$bookData->booking_id)); | |||
if($payfor == '2'){ | |||
$this->db->query("UPDATE orders JOIN transaction ON transaction.booking_id = orders.order_id SET orders.status = $odr_status WHERE transaction.id = $transId"); | |||
} | } | ||
else{ | return 1; | ||
$result = array('status' => 'error'); | |||
} | } | ||
return $result; | public function productSearch($postData){ | ||
$respArr = array('status'=>'error'); | |||
if(empty($postData)){ | |||
return $respArr; | |||
} | } | ||
public function order_status($request){ | |||
$data = $this->geySysSettings(); | |||
$google_key = $data->google_api_key; | |||
$rs = $this->db->query("SELECT * FROM orders | $per_page = 10; | ||
WHERE id = '".$request['order_id']."'")->row(); | $page = (isset($data['page']))?$data['page']:'0'; | ||
$where = ''; | |||
if(!empty($rs)){ | if(isset($postData['key']) && !empty($postData['key'])){ | ||
$where .= " (PRD.product_name LIKE '%".$postData['key']."%' OR | |||
$shopData = file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?place_id=".$rs->shop_id."&key=".$google_key); | PRD.short_description LIKE '%".$postData['key']."%' OR | ||
if(empty($shopData)){ | PRD.description LIKE '%".$postData['key']."%') AND "; | ||
return array('status'=>'error'); | |||
} | } | ||
$shopData = json_decode($shopData,true); | |||
$shopAddress = $shopData['results'][0]['formatted_address']; | |||
$data = array('order_status' => $rs->status, | if(isset($postData['brand_id']) && !empty($postData['brand_id'])){ | ||
'item_name' => $rs->item_name, | $where .= " PRD.brand_id IN (".implode(',',$postData['brand_id']).") AND "; | ||
'amount' => $rs->amount, | } | ||
'address'=>$shopAddress, | |||
); | |||
$result = array('status' => 'success','user' => $data); | if(isset($postData['minPrice']) && $postData['minPrice'] != ''){ | ||
$where .= " PRD.amount > ".$postData['minPrice']." AND "; | |||
} | |||
if(isset($postData['maxPrice']) && $postData['maxPrice'] != ''){ | |||
$where .= " PRD.amount < ".$postData['maxPrice']." AND "; | |||
} | |||
$result = $this->db->query("SELECT ROUND(AVG(REV.rating),2) AS rating, | |||
COUNT(REV.id) AS count,PRD.*,PI.image | |||
FROM products AS PRD | |||
LEFT JOIN product_images AS PI ON | |||
(PI.id=(SELECT MIN(id) | |||
FROM product_images | |||
WHERE product_id= PRD.product_id AND | |||
PRD.status='1')) | |||
LEFT JOIN product_rating AS REV ON REV.product_id = PRD.product_id | |||
WHERE $where PRD.status='1' | |||
GROUP BY PRD.product_id,PI.product_id | |||
LIMIT $page,$per_page"); | |||
//pr($this->db->last_query()); | |||
if(!empty($result) && $result->num_rows() > 0){ | |||
$respArr['status'] = 'success'; | |||
$respArr['data'] = $result->result_array(); | |||
} | } | ||
else{ | return $respArr; | ||
$result = array('status' => 'error'); | |||
} | } | ||
return $result; | public function getBrands(){ | ||
$respArr = array('status'=>'error'); | |||
$prdt_brand = $this->db->get_where('product_brand',array('status'=>'1'))->result(); | |||
if(count($prdt_brand) > 0){ | |||
$query = $this->db->query("SELECT MIN(amount) AS minamount, MAX(amount) AS maxamount | |||
FROM products WHERE status='1'")->row(); | |||
$respArr['status'] = 'success'; | |||
$respArr['brands'] = $prdt_brand; | |||
$respArr['minamount'] = $query->minamount; | |||
$respArr['maxamount'] = $query->maxamount; | |||
} | } | ||
return $respArr; | |||
public function confirm_delivery($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$rs = $this->db->query("SELECT receipt_photo FROM orders | |||
WHERE id = '".$request['order_id']."'")->row(); | |||
if($rs->receipt_photo != ''){ | |||
$data = array('status' => '2'); | |||
$this->db->where('users_id', $id); | |||
$this->db->where('id', $request['order_id']); | |||
$query = $this->db->update('orders', $data); | |||
$result = array('status' => 'success'); | |||
return $result; | |||
} | } | ||
else{ | |||
$result = array('status' => 'error','message' => 'Please upload the receipt_photo'); | |||
return $result; | |||
public function SingleProductSearch($postData){ | |||
$respArr = array('status'=>'error'); | |||
if(empty($postData)){ | |||
return $respArr; | |||
} | } | ||
} else { | $sql = "SELECT ROUND(AVG(REV.rating),2) AS rating, COUNT(REV.id) AS count,PRD.* | ||
FROM products AS PRD | |||
$result = array('status' => 'error','message' => 'Insufficient data'); | LEFT JOIN product_rating AS REV ON REV.product_id = PRD.product_id | ||
return $result; | WHERE PRD.product_id =".$postData['product_id']; | ||
$this->db->query($sql); | |||
$result = $this->db->query($sql); | |||
if(!empty($result) && $result->num_rows() > 0){ | |||
$respArr['status'] = 'success'; | |||
$respArr['data'] = $result->row(); | |||
$prdt_img = $this->db->get_where('product_images',array('product_id'=>$postData['product_id'],'status'=>'1'))->result(); | |||
$reviews = $this->db->get_where('product_rating',array('product_id'=>$postData['product_id'],'status'=>'1'))->result(); | |||
$respArr['data']->images = ''; | |||
$respArr['data']->reviews = ''; | |||
if(count($prdt_img) > 0){ | |||
$respArr['data']->images = $prdt_img; | |||
} | } | ||
if(count($reviews) > 0){ | |||
$respArr['data']->reviews = $reviews ; | |||
} | } | ||
public function order_accept_reject($request){ | |||
$order_status = $request['type']; | |||
$order_id = $request['request_id']; | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$data1 = "SELECT id FROM orders WHERE req_id = $order_id"; | |||
$query1 = $this->db->query($data1); | |||
$rs = $query1->row(); | |||
$ord_id = $rs->id; | |||
if($order_status==0) | |||
{ | |||
$data = array('status' => '1'); | |||
$data1 = array('driver_id' => $id, | |||
'status' => '1' | |||
); | |||
$this->db->where('id', $request['request_id']); | |||
$query = $this->db->update('request', $data); | |||
// echo $this->db->last_query(); | |||
// die(); | |||
$this->db->where('req_id', $request['request_id']); | |||
$query = $this->db->update('orders', $data1); | |||
$result = array('status' => 'success','data'=> $ord_id); | |||
$fcm_data = array('id'=>$order_id,'title'=>'WAAW','message'=>'Request Accepted'); | |||
$this->push_sent_cancel($rideData['fcm_token'], $fcm_data); | |||
return $result; | |||
} | } | ||
return $respArr; | |||
if($order_status==1) | |||
{ | |||
$data = array('status' => '2'); | |||
$this->db->where('id', $request['request_id']); | |||
$query = $this->db->update('request', $data); | |||
$result = array('status' => 'success','data'=> $ord_id); | |||
$fcm_data = array('id'=>$order_id,'title'=>'WAAW','message'=>'Request Rejected'); | |||
$this->push_sent_cancel($rideData['fcm_token'], $fcm_data); | |||
return $result; | |||
} | } | ||
} else { | public function saveUserAddress($postData = array()){ | ||
$respArr = array('status'=>'error','message'=>'Something Went Wrong.. Try Again Later'); | |||
$result = array('status' => 'error'); | if(empty($postData)){ | ||
return $result; | $respArr['message'] = 'All Field is required'; | ||
return $respArr; | |||
} | } | ||
if($this->db->insert('customer_address',$postData)){ | |||
$respArr['status'] = "success"; | |||
$respArr['message'] = "Address Added Successfully"; | |||
} | } | ||
return $respArr; | |||
function push_sent_cancel($fcm_token, $fcm_data) { | |||
$data1 = "SELECT * FROM setting WHERE id = '1' "; | |||
$query1 = $this->db->query($data1); | |||
$rs = $query1->row(); | |||
$key = $rs->api_key; | |||
$data = "{ \"notification\": { \"title\": \"".$fcm_data['title']."\", \"text\": \"".$fcm_data['message']."\", \"sound\": \"default\" }, \"time_to_live\": 60, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"request_id\" : \"".$fcm_data['id']."\", \"trip_status\" : 0}}}, \"collapse_key\" : \"trip\", \"priority\":\"high\", \"to\" : \"".$fcm_token."\"}"; | |||
$ch = curl_init("https://fcm.googleapis.com/fcm/send"); | |||
$header = array('Content-Type: application/json', 'Authorization: key='.$key); | |||
curl_setopt($ch, CURLOPT_HTTPHEADER, $header); | |||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |||
curl_setopt($ch, CURLOPT_POST, 1); | |||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |||
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |||
// curl_close($ch); | |||
$out = curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |||
curl_exec($ch); | |||
curl_close($ch); | |||
} | } | ||
public function search($request){ | public function getUserAddress($postData){ | ||
$respArr = array('status'=>'error'); | |||
$data = $this->geySysSettings(); | if(empty($postData['user_id'])){ | ||
$google_key = $data->google_api_key; | $respArr['message'] = 'User Id is required'; | ||
if(!isset($request['type']) || empty($request['type']) || !isset($request['latitude']) || empty($request['latitude']) || !isset($request['longitude']) || empty($request['longitude'])){ | return $respArr; | ||
return array('status'=>'error'); | |||
} | } | ||
if(isset($request['page_token']) && !empty($request['page_token'])){ | |||
$urlParams = '&pagetoken='.$request['page_token']; | $result = $this->db->get_where('customer_address',array('customer_id'=>$postData['user_id'],'status'=>'1')); | ||
} else { | if(!empty($result) && !empty($result = $result->result())){ | ||
$urlParams = "&location=".$request['latitude'].",".$request['longitude']; | $respArr['status'] = 'success'; | ||
$urlParams.= "&rankby=distance"; | $respArr['data'] = $result; | ||
$urlParams.= "&type=".str_replace(',','|',trim($request['type'])); | |||
if(isset($request['query']) && !empty($request['query'])){ | |||
$urlParams.= "&keyword=".str_replace(',','|',trim($request['query'])); | |||
} | } | ||
return $respArr; | |||
} | } | ||
$searchData = file_get_contents("https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=".$google_key.$urlParams); | public function getUserAddressById($postData){ | ||
$respArr = array('status'=>'error'); | |||
if(empty($searchData)){ | if(empty($postData['address_id'])){ | ||
return array('status'=>'error'); | $respArr['message'] = 'Address Id is required'; | ||
return $respArr; | |||
} | } | ||
$searchData = json_decode($searchData,true); | if(empty($postData['customer_id'])){ | ||
$respArr['message'] = 'Customer Id is required'; | |||
if(empty($searchData) || $searchData['status']!='OK'){ | return $respArr; | ||
return array('status'=>'error'); | |||
} | } | ||
$deStores = array(); | $result = $this->db->get_where('customer_address',array('id'=>$postData['address_id'],'customer_id'=>$postData['customer_id'])); | ||
$resultData = $this->db->query("SELECT place_id FROM delisted_stores WHERE status = '1'"); | if(!empty($result) && !empty($result = $result->row())){ | ||
if(!empty($resultData)){ | $respArr['status'] = 'success'; | ||
$resultData = $resultData->result_array(); | $respArr['data'] = $result; | ||
foreach ($resultData AS $place_id) { | |||
$deStores[] = $place_id['place_id']; | |||
} | } | ||
return $respArr; | |||
} | } | ||
$i = 0; | public function updateUserAddress($postData){ | ||
$placelist = array(); | $respArr = array('status'=>'error'); | ||
if(empty($postData['data'])){ | |||
$page_token = $searchData['next_page_token']; | $respArr['message'] = 'All Field is required'; | ||
$searchData = $searchData['results']; | return $respArr; | ||
foreach ($searchData AS $shopinfo) { | |||
if(!isset($shopinfo['place_id']) || empty($shopinfo['place_id']) || (!empty($deStores) && in_array($shopinfo['place_id'],$deStores))){ | |||
continue; | |||
} | } | ||
$shopLoc = $shopinfo['geometry']['location']; | |||
$lat = $shopLoc['lat']; | |||
$lng = $shopLoc['lng']; | |||
$shopLoc = $shopinfo['geometry']['location']; | |||
if( isset($shopinfo['opening_hour']) || isset($shopinfo['opening_hour']['open_now'])||($shopinfo['opening_hours']['open_now'] == 1) && isset($shopinfo['opening_hours']['open_now'])) | |||
$open_hotel = "true"; | |||
else | |||
$open_hotel = "false"; | |||
$placelist[$i]['place_id'] = (isset($shopinfo['place_id']))?$shopinfo['place_id']:"null"; | |||
$placelist[$i]['name'] = (isset($shopinfo['name']))?$shopinfo['name']:"null"; | |||
$placelist[$i]['image'] = (isset($shopinfo['icon']))?$shopinfo['icon']:"null"; | |||
$placelist[$i]['rating'] = (isset($shopinfo['rating']))?$shopinfo['rating']:"null"; | |||
$placelist[$i]['latitude'] = (isset($lat))?$lat:"null"; | |||
$placelist[$i]['longitude'] = (isset($lng))?$lng:"null"; | |||
$placelist[$i]['is_opened'] = (isset($open_hotel))?$open_hotel:"null"; | |||
$placelist[$i]['address'] = (isset($shopinfo['vicinity']))?$shopinfo['vicinity']:"null"; | |||
$i++; | |||
if(empty($postData['address_id'])){ | |||
$respArr['message'] = 'Address Id is required'; | |||
return $respArr; | |||
} | } | ||
$result = array('status' => 'success','data' =>array('places_list' => $placelist),'meta'=>array('page_token'=>$page_token)); | if($this->db->update('customer_address',$postData['data'],array('id'=>$postData['address_id']))){ | ||
return $result; | $respArr['status'] = 'success'; | ||
$respArr['message'] = 'Address Updated Successfully'; | |||
} | |||
} | return $respArr; | ||
} | |||
public function order_picked_up($request){ | |||
$query = $this->db->where('unique_id', $request['auth'])->get('auth_table'); | |||
if ($query->num_rows() > 0) { | |||
$rs = $query->row(); | |||
$id = $rs->member_id; | |||
$data = array('status' => '1'); | |||
$this->db->where('users_id', $id); | public function initOrderBooking($postData=array()){ | ||
$respArr = array('status'=>'error'); | |||
if(empty($postData['data'])){ | |||
$respArr['message'] = 'All Field is required'; | |||
return $respArr; | |||
} | |||
$this->db->where('id', $request['order_id']); | $squence = str_pad(rand(1111,9999),4,0,STR_PAD_LEFT); | ||
$query = $this->db->update('orders', $data); | $insert_array = array( | ||
'format_order_id'=>'ORD'.date('ymd').$squence, | |||
'product_id'=>$postData['data']['product_id'], | |||
'customer_id'=>$postData['data']['customer_id'], | |||
'address_id'=>$postData['data']['address_id'], | |||
'quantity'=>$postData['data']['quantity'], | |||
'amount'=>$postData['data']['total_amount'] | |||
); | |||
$this->db->insert('orders',$insert_array); | |||
$insert_id = $this->db->insert_id(); | |||
$this->db->insert('transaction',array( | |||
'customer_id'=>$postData['data']['customer_id'], | |||
'booking_id'=>$insert_id, | |||
'payment_for'=>'2', | |||
'datetime'=>date('Y-m-d h:i:s'), | |||
'amount'=>$postData['data']['total_amount'] | |||
)); | |||
$last_id = $this->db->insert_id(); | |||
$respArr['status'] = 'success'; | |||
$respArr['data'] = $last_id; | |||
return $respArr; | |||
} | |||
$result = array('status' => 'success'); | public function getOrderPayDetails($orderId){ | ||
return $result; | $respArr = array('status'=>'error'); | ||
if(empty($orderId)){ | |||
$respArr['message'] = 'Order Id is required'; | |||
return $respArr; | |||
} | |||
$result = $this->db->query("SELECT TRANS.amount,CUST.email | |||
FROM transaction TRANS | |||
LEFT JOIN customers CUST | |||
ON CUST.customer_id = TRANS.customer_id | |||
WHERE TRANS.id = $orderId" | |||
); | |||
if(!empty($result) && !empty($result = $result->row())){ | |||
$this->db->query("UPDATE orders JOIN transaction ON transaction.booking_id = orders.order_id SET orders.status = '1' WHERE transaction.id = $orderId"); | |||
} else { | $respArr['status'] = 'success'; | ||
$respArr['data'] = $result; | |||
} | |||
return $respArr; | |||
} | |||
$result = array('status' => 'error'); | public function getOrderDetail($postData){ | ||
return $result; | $respArr = array('status'=>'error'); | ||
if(empty($postData['ref_id'])){ | |||
$respArr['message'] = 'Transaction Id is required'; | |||
return $respArr; | |||
} | |||
$result = $this->db->query("SELECT TRANS.datetime,TRANS.amount,TRANS.status,PRD.product_id, | |||
PRD.product_name,PRD.short_description,ORDS.format_order_id,ORDS.quantity,ORDS.expected_delivery,ORDS.delivered,ORDS.status AS odr_status | |||
FROM transaction TRANS | |||
JOIN orders ORDS ON ORDS.order_id = TRANS.booking_id | |||
JOIN products PRD ON PRD.product_id = ORDS.product_id | |||
WHERE TRANS.id =".$postData['ref_id']); | |||
if(!empty($result) && !empty($result = $result->row())){ | |||
$prdt_img = $this->db->get_where('product_images',array('product_id'=>$result->product_id))->result(); | |||
$result->images = ''; | |||
if(count($prdt_img) > 0){ | |||
$result->images = $prdt_img; | |||
} | } | ||
$respArr['status'] = 'success'; | |||
$respArr['data'] = $result; | |||
} | |||
return $respArr; | |||
} | } | ||
public function rateProduct($postData=array()){ | |||
$respArr = array('status'=>'error'); | |||
if(empty($postData)){ | |||
$respArr['message'] = 'All Field is required'; | |||
return $respArr; | |||
} | |||
$postData['datetime'] = date('Y-m-d h:i:s'); | |||
if($this->db->insert('product_rating',$postData)){ | |||
$respArr['status'] = 'success'; | |||
$respArr['message'] = 'Rated Successfully'; | |||
} | |||
return $respArr; | |||
} | |||
} | } | ||
?> | ?> |
application/views/Brand/addBrand.php
0 → 100644
application/views/Brand/viewBrands.php
0 → 100644
application/views/Orders/list_orders.php
0 → 100644
application/views/Product/addproduct.php
0 → 100644
application/views/Product/viewProduct.php
0 → 100644
1.72 MB
174 KB
84.2 KB
45.5 KB
1.78 MB
45.5 KB
6.42 KB
45.5 KB
1.78 MB
45.5 KB
45.5 KB
assets/uploads/services/1547620908_car1.jpg
0 → 100644
427 KB
586 KB
assets/uploads/services/1547621128_car1.jpg
0 → 100644
427 KB
2.21 MB
8.57 KB
270 KB
assets/uploads/services/3_car.jpg
0 → 100644
2.51 MB
assets/uploads/services/3_car1.jpg
0 → 100644
427 KB
assets/uploads/services/Audi-r8.jpg
0 → 100644
586 KB
assets/uploads/services/Himalayan.jpg
0 → 100644
332 KB
assets/uploads/services/[email protected]
0 → 100644
1.36 KB
assets/uploads/services/[email protected]
0 → 100644
1.36 KB
assets/uploads/services/[email protected]
0 → 100644
1.36 KB
assets/uploads/services/[email protected]
0 → 100644
1.36 KB
54.6 KB
84.2 KB
309 KB
2.51 MB
18.8 KB
18.8 KB
18.8 KB
427 KB
18.8 KB
54.6 KB
84.2 KB
309 KB
2.51 MB
assets/uploads/services/orig.jpg
0 → 100644
309 KB
... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
-- https://www.phpmyadmin.net/ | -- https://www.phpmyadmin.net/ | ||
-- | -- | ||
-- Host: db | -- Host: db | ||
-- Generation Time: Jan 18, 2019 at 01:31 PM | -- Generation Time: Mar 22, 2019 at 12:18 PM | ||
-- Server version: 5.6.41 | -- Server version: 5.6.41 | ||
-- PHP Version: 7.2.8 | -- PHP Version: 7.2.8 | ||
... | @@ -43,12 +43,35 @@ CREATE TABLE `admin_users` ( | ... | @@ -43,12 +43,35 @@ CREATE TABLE `admin_users` ( |
-- | -- | ||
INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_name`, `profile_image`, `status`) VALUES | INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_name`, `profile_image`, `status`) VALUES | ||
(1, 'admin', '202cb962ac59075b964b07152d234b70', 1, 'Super Admin User', 'assets/uploads/services/1543990056_1523012120_default.png', 1), | (1, 'admin', '202cb962ac59075b964b07152d234b70', 1, 'Super Admin', 'assets/uploads/services/1543990056_1523012120_default.png', 1), | ||
(2, 'mechanic', '202cb962ac59075b964b07152d234b70', 2, 'Mechanic', 'assets/uploads/services/1546929651_audi-r8-1366x786.jpg', 1), | (2, 'mechanics', '202cb962ac59075b964b07152d234b70', 2, 'kmjuiju', 'assets/uploads/services/1550042227_Yoshi_(Universal-X).png', 1), | ||
(11, 'cfghbfchdrfg', '97a4aa7bfb0e20d7b9813ffe99f91fd4', 2, 'lnoik', 'assets/uploads/services/1544013534_images.jpg', 1), | (11, 'cfghbfchdrfg', '97a4aa7bfb0e20d7b9813ffe99f91fd4', 2, 'jiojio', 'assets/uploads/services/1544013534_images.jpg', 1), | ||
(12, 'admin123', '202cb962ac59075b964b07152d234b70', 2, 'Super Admin', 'assets/uploads/services/1544091403_Himalayan.jpg', 2), | (12, 'admin123', '202cb962ac59075b964b07152d234b70', 2, 'Super Hippo', 'assets/uploads/services/1544091403_Himalayan.jpg', 2), | ||
(13, 'jansa', '202cb962ac59075b964b07152d234b70', 2, 'Jensa Mechanic', 'assets/uploads/services/1546851554_234858854male.jpg', 1), | (13, 'jansa', '202cb962ac59075b964b07152d234b70', 1, 'Jensa Mechanic', 'assets/uploads/services/1546851554_234858854male.jpg', 1), | ||
(14, 'mechanic_1', '202cb962ac59075b964b07152d234b70', 2, 'Super Mechanic 1', 'assets/uploads/services/1546929755_1523012036_hj.jpg', 1); | (14, 'mechanic_1', '202cb962ac59075b964b07152d234b70', 2, 'Driver jiol', 'assets/uploads/services/1546929755_1523012036_hj.jpg', 1); | ||
-- -------------------------------------------------------- | |||
-- | |||
-- Table structure for table `authtable` | |||
-- | |||
CREATE TABLE `authtable` ( | |||
`id` int(11) NOT NULL, | |||
`customer_id` int(11) NOT NULL, | |||
`authtoken` varchar(250) NOT NULL | |||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |||
-- | |||
-- Dumping data for table `authtable` | |||
-- | |||
INSERT INTO `authtable` (`id`, `customer_id`, `authtoken`) VALUES | |||
(1, 15, 'Dcarfixsce4c6f565626b189c050d7e1872bc220541cfd8d'), | |||
(3, 17, 'Dcarfixs770a63377542b51aed33668e53f2736a16d3ef5a'), | |||
(6, 18, 'Dcarfixsb5a5177e87d91dc0bfaa28ab3f09c62855be3a54'), | |||
(8, 3, 'Dcarfixs26f38971326b399ef38e874128b44286f33031bc'), | |||
(9, 8, 'Dcarfixs6552f72521375bfc5f3295d08137a71722c5155e'); | |||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -64,10 +87,10 @@ CREATE TABLE `bookings` ( | ... | @@ -64,10 +87,10 @@ CREATE TABLE `bookings` ( |
`mileage` varchar(25) DEFAULT NULL, | `mileage` varchar(25) DEFAULT NULL, | ||
`cost` decimal(10,0) DEFAULT NULL, | `cost` decimal(10,0) DEFAULT NULL, | ||
`issues_selected` longtext, | `issues_selected` longtext, | ||
`custom_issue_data` blob, | `custom_issue_data` longtext, | ||
`scheduled_date` varchar(50) DEFAULT NULL, | `scheduled_date` varchar(50) DEFAULT NULL, | ||
`scheduled_time` varchar(50) DEFAULT NULL, | `scheduled_time` varchar(50) DEFAULT NULL, | ||
`status` tinyint(3) NOT NULL DEFAULT '1' | `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '0-Pending Approval,1-Accepted,2-Deleted,3-Completed,4-Cancelled,5-Incomplete' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
-- | -- | ||
... | @@ -75,18 +98,21 @@ CREATE TABLE `bookings` ( | ... | @@ -75,18 +98,21 @@ CREATE TABLE `bookings` ( |
-- | -- | ||
INSERT INTO `bookings` (`booking_id`, `customer_id`, `mechanic_id`, `customer_veh_id`, `mileage`, `cost`, `issues_selected`, `custom_issue_data`, `scheduled_date`, `scheduled_time`, `status`) VALUES | INSERT INTO `bookings` (`booking_id`, `customer_id`, `mechanic_id`, `customer_veh_id`, `mileage`, `cost`, `issues_selected`, `custom_issue_data`, `scheduled_date`, `scheduled_time`, `status`) VALUES | ||
(4, 3, 13, 27, '', '1000', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-17', '11:00 AM', 1), | (1, 3, 13, 40, '', '1500', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"Add notes for General Diagnosis (Please provide description in notes section) (optional) * Add notes for General Diagnosis (Please provide description in notes section) (optional) * Add notes for General Diagnosis (Please provide description in notes section) (optional) * \",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages323012019104623.jpg\",\"assets\\/uploads\\/services\\/optionalImages3230120191046231.jpg\",\"assets\\/uploads\\/services\\/optionalImages3230120191046232.jpg\",\"assets\\/uploads\\/services\\/optionalImages3230120191046233.jpg\"],\"optionalVideos\":[]}', '2019-01-23', '11:00 AM', 3), | ||
(5, 3, 2, 28, '', '2520', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"10\",\"issue_category\":\"General Service L:1\"}]', NULL, '2019-01-17', '01:00 PM', 1), | (2, 2, 2, 43, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"Add notes for General Diagnosis (Please provide description in notes section) (optional) *\",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages323012019125439.png\"],\"optionalVideos\":[]}', '2019-01-23', '10:00 AM', 0), | ||
(6, 3, 2, 29, '', '3652', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"10\",\"issue_category\":\"General Service L:1\"}]', NULL, '2019-01-17', '02:00 PM', 0), | (3, 3, 13, 49, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"\",\"optionalImages\":[],\"optionalVideos\":[]}', '2019-01-23', '11:00 AM', 0), | ||
(7, 3, 13, 30, '', '7582', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-17', '11:00 AM', 0), | (4, 3, 13, 51, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"DESCRIPTION\\nAdd notes for General Diagnosis (Please provide description in notes section) (optional) *\",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages323012019143335.jpg\"],\"optionalVideos\":[]}', '2019-01-23', '11:00 AM', 0), | ||
(8, 3, 13, 31, '', '522', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-17', '11:00 AM', 0), | (5, 3, 13, 52, '', '700', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"\",\"optionalImages\":[],\"optionalVideos\":[]}', '2019-01-23', '05:00 PM', 0), | ||
(9, 3, 13, 32, '', '2500', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '11:00 AM', 0), | (6, 3, 13, 53, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"\",\"optionalImages\":[],\"optionalVideos\":[]}', '2019-01-23', '10:00 AM', 0), | ||
(10, 3, 13, 34, '', '3500', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', NULL, '2019-01-18', '12:00 PM', 0), | (7, 3, 13, 54, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"\",\"optionalImages\":[],\"optionalVideos\":[]}', '2019-01-23', '12:00 PM', 0), | ||
(11, 3, 13, 35, '', '1000', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '11:00 AM', 0), | (8, 3, 13, 55, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"Add notes for General Diagnosis (Please provide description in notes section) (optional) *\",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages323012019144018.png\"],\"optionalVideos\":[]}', '2019-01-23', '11:00 AM', 0), | ||
(12, 3, 13, 36, '', '850', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '12:00 PM', 0), | (9, 3, 13, 56, '', '500', '[{\"issue_id\":\"id of service\",\"issue\":\"name of service\",\"sub_issue_id\":\"id of sub service\",\"issue_category\":\"name of sub service\"},{\"issue_id\":\"id of service\",\"issue\":\"name of service\",\"sub_issue_id\":\"id of sub service\",\"issue_category\":\"name of sub service\"}]', '{\"optionlaDescription\":\"\",\"optionalImages\":[],\"optionalVideos\":[]}', '2019-02-24', '10:00 AM', 0), | ||
(13, 3, 13, 37, '', '6950', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '11:00 AM', 0), | (10, 17, 13, 57, '40', '500', 'null', '{\"optionlaDescription\":\"abcd\",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages13022019182314176298-nature-green-leaves-plants-digital_art-floating_island-trees-glass-broken-sphere-grass-rock13.jpg\",\"assets\\/uploads\\/services\\/optionalImages13022019182314639408-download-free-hd-3d-desktop-backgrounds-1920x1080-for-iphone-51.jpg\",\"assets\\/uploads\\/services\\/optionalImages130220191823157040690-desktop-backgrounds-hd14.jpg\",\"assets\\/uploads\\/services\\/optionalImages1302201918231541607821-Little-girl-with-red-umbrella-playing-in-the-rain-Kids-play-outdoors-by-rainy-weather-in-fall-Autumn-Stock-Photo.jpg\"],\"optionalVideos\":[]}', '2019-02-22', '10:00 AM', 5), | ||
(14, 3, 13, 38, '', '850', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '10:00 AM', 0), | (11, 17, NULL, 58, '40', NULL, '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', NULL, NULL, NULL, 5), | ||
(15, 3, 13, 39, '', '800', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '04:00 PM', 0); | (12, 17, NULL, 59, '40', NULL, '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', NULL, NULL, NULL, 5), | ||
(13, 3, 13, 60, '', '400', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', '{\"optionlaDescription\":\"Add notes for General Diagnosis (Please provide description in notes section) (optional) * Add notes for General Diagnosis (Please provide description in notes section) (optional) * Add notes for General Diagnosis (Please provide description in notes section) (optional) * \",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages330012019143038.jpg\",\"assets\\/uploads\\/services\\/optionalImages3300120191430381.jpg\",\"assets\\/uploads\\/services\\/optionalImages3300120191430382.jpg\",\"assets\\/uploads\\/services\\/optionalImages3300120191430383.jpg\"],\"optionalVideos\":[]}', '2019-01-31', '09:00 AM', 0), | |||
(14, 17, NULL, 61, '40', NULL, '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', NULL, NULL, NULL, 5), | |||
(15, 17, NULL, 62, '30 - 32 miles/gallon', NULL, NULL, '{\"optionlaDescription\":\"abcd\",\"optionalImages\":[\"assets\\/uploads\\/services\\/optionalImages15022019112201Yoshi_(Universal-X).png\"],\"optionalVideos\":[]}', NULL, NULL, 5); | |||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -98,12 +124,14 @@ CREATE TABLE `customers` ( | ... | @@ -98,12 +124,14 @@ CREATE TABLE `customers` ( |
`customer_id` int(20) NOT NULL, | `customer_id` int(20) NOT NULL, | ||
`first_name` varchar(50) NOT NULL, | `first_name` varchar(50) NOT NULL, | ||
`last_name` varchar(50) NOT NULL, | `last_name` varchar(50) NOT NULL, | ||
`country_code` varchar(50) DEFAULT NULL, | |||
`phone` varchar(20) DEFAULT NULL, | `phone` varchar(20) DEFAULT NULL, | ||
`email` varchar(200) DEFAULT NULL, | `email` varchar(200) DEFAULT NULL, | ||
`address` varchar(500) DEFAULT NULL, | `address` varchar(500) DEFAULT NULL, | ||
`profile_image` varchar(500) DEFAULT NULL, | `profile_image` varchar(500) DEFAULT NULL, | ||
`password` varchar(50) DEFAULT NULL, | `password` varchar(50) DEFAULT NULL, | ||
`date_of_birth` varchar(200) DEFAULT NULL, | `date_of_birth` varchar(200) DEFAULT NULL, | ||
`is_otp_verified` int(11) NOT NULL DEFAULT '0' COMMENT '0-not verified,1-verified', | |||
`status` tinyint(3) NOT NULL DEFAULT '1' | `status` tinyint(3) NOT NULL DEFAULT '1' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
... | @@ -111,13 +139,16 @@ CREATE TABLE `customers` ( | ... | @@ -111,13 +139,16 @@ CREATE TABLE `customers` ( |
-- Dumping data for table `customers` | -- Dumping data for table `customers` | ||
-- | -- | ||
INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `email`, `address`, `profile_image`, `password`, `date_of_birth`, `status`) VALUES | INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `country_code`, `phone`, `email`, `address`, `profile_image`, `password`, `date_of_birth`, `is_otp_verified`, `status`) VALUES | ||
(1, 'Tobin', 'Thomas', '9995559194', '[email protected]', 'Techware', 'assets/uploads/services/1544417044_sniper.jpg', NULL, '05/05/1994', 1), | (1, 'Tobin', 'Thomas', '', '9995559194', '[email protected]', 'Techware', 'assets/uploads/services/1544417044_sniper.jpg', NULL, '05/05/1994', 0, 1), | ||
(2, 'Tobin', 'Thomas', '99955752194', '[email protected]', 'Techware', 'assets/uploads/services/1545036793_car1.jpg', NULL, '12/20/2018', 1), | (2, 'Tobin', 'Thomas', '', '99955752194', '[email protected]', 'Techware', 'assets/uploads/services/1545036793_car1.jpg', NULL, '12/20/2018', 0, 1), | ||
(3, 'Tobin', 'Thomas', '9993242394', '[email protected]', 'Techware', 'assets/uploads/services/3_1393675771-ferrari.jpg', 'e10adc3949ba59abbe56e057f20f883e', '12/11/2018', 1), | (3, 'Tobin', 'Thomas', '', '9993242394', '[email protected]', 'Techware', 'assets/uploads/services/3_1393675771-ferrari.jpg', 'e10adc3949ba59abbe56e057f20f883e', '12/11/2018', 0, 1), | ||
(7, 'tobin', 'thomas', '9995559194', '[email protected]', NULL, 'assets/uploads/services/1545036793_car1.jpg', 'e10adc3949ba59abbe56e057f20f883e', NULL, 1), | (7, 'tobin', 'thomas', '', '9995559194', '[email protected]', NULL, 'assets/uploads/services/1545036793_car1.jpg', 'e10adc3949ba59abbe56e057f20f883e', NULL, 0, 1), | ||
(8, 'tobin', 'thomas', '8956235896', '[email protected]', NULL, 'assets/uploads/services/1545036793_car1.jpg', 'e10adc3949ba59abbe56e057f20f883e', NULL, 1), | (8, 'tobin', 'thomas', '', '8956235896', '[email protected]', NULL, 'assets/uploads/services/1545036793_car1.jpg', 'e10adc3949ba59abbe56e057f20f883e', NULL, 0, 1), | ||
(9, 'tobin', 'thomas test', NULL, '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 1); | (9, 'tobin', 'thomas test', '', NULL, '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 0, 1), | ||
(16, 'anu', '', '+91', '9856215874', '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 0, 1), | |||
(17, 'anu', '', '+91', '98562152374', '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 0, 1), | |||
(18, 'anu', '', '+91', '9857581523', '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 0, 1); | |||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -138,7 +169,7 @@ CREATE TABLE `customer_vehicle` ( | ... | @@ -138,7 +169,7 @@ CREATE TABLE `customer_vehicle` ( |
`car_loc_lat` varchar(150) DEFAULT NULL, | `car_loc_lat` varchar(150) DEFAULT NULL, | ||
`car_loc_lng` varchar(150) DEFAULT NULL, | `car_loc_lng` varchar(150) DEFAULT NULL, | ||
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`status` tinyint(3) NOT NULL DEFAULT '3' | `status` tinyint(3) NOT NULL DEFAULT '3' COMMENT '0-Inactive,1-Active,2-Deleted,3-Not Saved' | ||
) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
-- | -- | ||
... | @@ -146,36 +177,52 @@ CREATE TABLE `customer_vehicle` ( | ... | @@ -146,36 +177,52 @@ CREATE TABLE `customer_vehicle` ( |
-- | -- | ||
INSERT INTO `customer_vehicle` (`customer_veh_id`, `customer_id`, `car_name`, `car_model`, `car_maker`, `car_model_year`, `car_vin`, `vehicle_data`, `car_location`, `car_loc_lat`, `car_loc_lng`, `created_date`, `status`) VALUES | INSERT INTO `customer_vehicle` (`customer_veh_id`, `customer_id`, `car_name`, `car_model`, `car_maker`, `car_model_year`, `car_vin`, `vehicle_data`, `car_location`, `car_loc_lat`, `car_loc_lng`, `created_date`, `status`) VALUES | ||
(9, NULL, '2015 Hyundai Sonata SE', 'sonata', 'hyundai', '2015', NULL, '{\"vehicle\":\"2015 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2015\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"SE \\/ SE PZEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"37 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,295\",\"Delivery Charges\":\"$825\",\"MSRP\":\"$21,150\"},\"success\":true,\"error\":\"\"}', 'FL, USA', '27.6648274', '-81.5157535', '2018-12-17 10:11:03', 3), | (60, 3, '2005 Toyota Corolla', 'Corolla', 'Toyota', '2005', NULL, '{\"vehicle\":\"2005 Toyota Corolla\",\"attributes\":{\"Year\":\"2005\",\"Make\":\"Toyota\",\"Trim\":\"\",\"Model\":\"Corolla\",\"Engine\":\"\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-30 09:00:59', 3), | ||
(10, NULL, '2015 Hyundai Sonata SE', 'sonata', 'hyundai', '2015', NULL, '{\"vehicle\":\"2015 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2015\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"SE \\/ SE PZEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"37 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,295\",\"Delivery Charges\":\"$825\",\"MSRP\":\"$21,150\"},\"success\":true,\"error\":\"\"}', 'FL, USA', '27.6648274', '-81.5157535', '2018-12-17 10:11:08', 3), | (61, 17, '2018 Honda Corolla', 'Corolla', 'Honda', '2018', NULL, '{\"vehicle\":\"2018 Honda Corolla\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Honda\",\"Trim\":\"dsfds\",\"Model\":\"Corolla\",\"Engine\":\"Tg512\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '76.4521458', '10.247512', '2019-02-06 04:32:47', 3), | ||
(11, 2, '2016 Hyundai Sonata SE', 'sonata', 'hyundai', '2016', NULL, '{\"vehicle\":\"2016 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2016\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"SE\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"38 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,859\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,750\"},\"success\":true,\"error\":\"\"}', 'San Francisco, CA, USA', '37.7749295', '-122.4194155', '2018-12-17 10:17:53', 1), | (62, 17, '2005 Toyota Corolla', 'Corolla', 'Toyota', '2005', NULL, '{\"vehicle\":\"2005 Toyota Corolla\",\"attributes\":{\"Year\":\"2005\",\"Make\":\"Toyota\",\"Trim\":\"S\",\"Model\":\"Corolla\",\"Engine\":\"1.8-L L-4 DOHC 16V\"}}', 'kakkand info', '2134', '2433', '2019-02-08 07:17:53', 3), | ||
(3, NULL, '2011 Hyundai Sonata GLS', 'sonata', 'hyundai', '2011', NULL, '{\"vehicle\":\"2011 Hyundai Sonata GLS\",\"attributes\":{\"Year\":\"2011\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"GLS\",\"Short Trim\":\"GLS\",\"Trim Variations\":\"GLS PZEV \\/ GLS\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"22 miles\\/gallon\",\"Highway Mileage\":\"35 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"57.90 inches\",\"Overall Length\":\"189.80 inches\",\"Overall Width\":\"72.20 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$19,538\",\"Delivery Charges\":\"$750\",\"MSRP\":\"$20,395\"},\"success\":true,\"error\":\"\"}', '439 Boylston Street, Boston, MA, USA', '42.351495', '-71.072925', '2018-12-17 08:55:52', 3), | (56, 3, '2005 Toyota Corolla', 'Corolla', 'Toyota', '2005', NULL, '{\"vehicle\":\"2005 Toyota Corolla\",\"attributes\":{\"Year\":\"2005\",\"Make\":\"Toyota\",\"Trim\":\"\",\"Model\":\"Corolla\",\"Engine\":\"\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-23 09:11:12', 3), | ||
(4, 3, '2015 Hyundai Sonata SE', 'sonata', 'hyundai', '2015', NULL, '{\"vehicle\":\"2015 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2015\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"SE \\/ SE PZEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"37 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,295\",\"Delivery Charges\":\"$825\",\"MSRP\":\"$21,150\"},\"success\":true,\"error\":\"\"}', 'RI, USA', '41.5800945', '-71.4774291', '2018-12-17 08:56:55', 1), | (57, 17, '2018 Honda Corolla', 'Corolla', 'Honda', '2018', NULL, '{\"vehicle\":\"2018 Honda Corolla\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Honda\",\"Trim\":\"dsfds\",\"Model\":\"Corolla\",\"Engine\":\"Tg512\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '76.4521458', '10.247512', '2019-01-30 06:52:50', 3), | ||
(13, NULL, '2017 Hyundai Sonata SE', 'sonata', 'hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'H F Shepherd Drive, Decatur, GA, USA', '33.7119197', '-84.2785545', '2018-12-17 10:26:37', 3), | (58, 17, '2018 Honda Corolla', 'Corolla', 'Honda', '2018', NULL, '{\"vehicle\":\"2018 Honda Corolla\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Honda\",\"Trim\":\"dsfds\",\"Model\":\"Corolla\",\"Engine\":\"Tg512\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '76.4521458', '10.247512', '2019-01-30 06:53:42', 3), | ||
(14, NULL, '2012 Hyundai Sonata SE', 'sonata', 'hyundai', '2012', NULL, '{\"vehicle\":\"2012 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2012\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"SE\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"24 miles\\/gallon\",\"Highway Mileage\":\"35 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"57.90 inches\",\"Overall Length\":\"189.80 inches\",\"Overall Width\":\"72.20 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$24,725\",\"Delivery Charges\":\"$775\",\"MSRP\":\"$26,445\"},\"success\":true,\"error\":\"\"}', 'FDR Drive, Brooklyn, NY, USA', '40.7100593', '-73.9894836', '2018-12-17 10:30:06', 3), | (59, 17, '2018 Honda Corolla', 'Corolla', 'Honda', '2018', NULL, '{\"vehicle\":\"2018 Honda Corolla\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Honda\",\"Trim\":\"dsfds\",\"Model\":\"Corolla\",\"Engine\":\"Tg512\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '76.4521458', '10.247512', '2019-01-30 06:59:03', 3), | ||
(15, NULL, '2017 Hyundai Sonata SE', 'sonata', 'hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'DfR Solutions, Virginia Manor Road, Beltsville, MD, USA', '39.063356', '-76.893169', '2018-12-17 10:33:05', 3), | (52, 3, '2018 Peugeot 307 SW', '307 SW', 'Peugeot', '2018', NULL, '{\"vehicle\":\"2018 Peugeot 307 SW\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Peugeot\",\"Trim\":\"\",\"Model\":\"307 SW\",\"Engine\":\"\"}}', 'd808 El Camino Real, Burlingame, CA 94010, USA', '37.58087', '-122.3599866', '2019-01-23 09:07:05', 3), | ||
(16, NULL, '2017 Hyundai Sonata SE', 'sonata', 'hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'DfR Solutions, Virginia Manor Road, Beltsville, MD, USA', '39.063356', '-76.893169', '2018-12-17 10:33:11', 3), | (53, 3, '2005 Toyota Corolla', 'Corolla', 'Toyota', '2005', NULL, '{\"vehicle\":\"2005 Toyota Corolla\",\"attributes\":{\"Year\":\"2005\",\"Make\":\"Toyota\",\"Trim\":\"\",\"Model\":\"Corolla\",\"Engine\":\"\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-23 09:07:19', 3), | ||
(17, NULL, NULL, NULL, NULL, NULL, '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"CE\",\"Short Trim\":\"CE\",\"Trim Variations\":\"CE \\/ LE \\/ S\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.2 gallon\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8L L4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"Non-Abs | 4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"2615\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$14,287\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$15,790\"},\"success\":true,\"error\":\"\"}', 'DRTY SMMR, Myrtle Avenue, Brooklyn, NY, USA', '40.6973088', '-73.9308637', '2018-12-17 11:42:55', 3), | (54, 3, '2016 Dacia Duster', 'Duster', 'Dacia', '2016', NULL, '{\"vehicle\":\"2016 Dacia Duster\",\"attributes\":{\"Year\":\"2016\",\"Make\":\"Dacia\",\"Trim\":\"\",\"Model\":\"Duster\",\"Engine\":\"\"}}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-23 09:07:56', 3), | ||
(20, NULL, '2005 Toyota Corolla CE', NULL, NULL, NULL, '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"CE\",\"Short Trim\":\"CE\",\"Trim Variations\":\"CE \\/ LE \\/ S\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.2 gallon\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8L L4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"Non-Abs | 4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"2615\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$14,287\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$15,790\"},\"success\":true,\"error\":\"\",\"vehicle\":\"2005 Toyota Corolla CE\"}', 'CA, USA', '36.778261', '-119.4179324', '2018-12-17 12:35:05', 3), | (55, 3, '2005 Toyota Corolla', 'Corolla', 'Toyota', '2005', NULL, '{\"vehicle\":\"2005 Toyota Corolla\",\"attributes\":{\"Year\":\"2005\",\"Make\":\"Toyota\",\"Trim\":\"\",\"Model\":\"Corolla\",\"Engine\":\"\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-23 09:10:29', 3), | ||
(21, NULL, '2014 Hyundai Sonata GLS', 'sonata', 'hyundai', '2014', NULL, '{\"vehicle\":\"2014 Hyundai Sonata GLS\",\"attributes\":{\"Year\":\"2014\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"GLS\",\"Short Trim\":\"GLS\",\"Trim Variations\":\"GLS \\/ GLS PZEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"24 miles\\/gallon\",\"Highway Mileage\":\"35 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"57.90 inches\",\"Overall Length\":\"189.80 inches\",\"Overall Width\":\"72.20 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,532\",\"Delivery Charges\":\"$810\",\"MSRP\":\"$21,450\"},\"success\":true,\"error\":\"\"}', 'Fresno, CA, USA', '36.7377981', '-119.7871247', '2018-12-17 12:48:33', 3), | (51, 3, '2005 Toyota Corolla', 'Corolla', 'Toyota', '2005', NULL, '{\"vehicle\":\"2005 Toyota Corolla\",\"attributes\":{\"Year\":\"2005\",\"Make\":\"Toyota\",\"Trim\":\"\",\"Model\":\"Corolla\",\"Engine\":\"\"}}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-23 09:03:46', 3), | ||
(22, 3, '2018 Hyundai Sonata Sport', 'Sonata', 'Hyundai', '2018', NULL, '{\"vehicle\":\"2018 Hyundai Sonata Sport\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"Sport\",\"Short Trim\":\"SEL\",\"Trim Variations\":\"SEL \\/ Limited SULEV \\/ Sport \\/ Limited \\/ SEL SULEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Passenger Car\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"\",\"Doors\":\"4\",\"Fuel Type\":\"Gasoline\",\"Fuel Capacity\":\"\",\"City Mileage\":\"\",\"Highway Mileage\":\"\",\"Engine\":\"GDI THETA-II\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"\",\"Anti-Brake System\":\"\",\"Steering Type\":\"\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"\",\"Overall Length\":\"\",\"Overall Width\":\"\",\"Standard Seating\":\"\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'Groove ???? 2 G218 Rama I Rd, Khwaeng Pathum Wan, Khet Pathum Wan, Krung Thep Maha Nakhon 10330, Thailand', '13.7453362', '100.5381618', '2019-01-16 09:05:18', 2), | (49, 3, '2016 Citroën C6', 'C6', 'Citroën', '2016', NULL, '{\"vehicle\":\"2016 Citro\\u00ebn C6\",\"attributes\":{\"Year\":\"2016\",\"Make\":\"Citro\\u00ebn\",\"Trim\":\"\",\"Model\":\"C6\",\"Engine\":\"\"}}', 'Yonge St, Newmarket, ON, Canada', '44.0509919', '-79.4793029', '2019-01-23 08:57:08', 3), | ||
(23, 3, '2017 Hyundai Sonata SE', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-16 09:09:10', 1), | (50, 3, '2005 Toyota Corolla S', 'Corolla', 'Toyota', '2005', '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"S\",\"Short Trim\":\"S\",\"Trim Variations\":\"S \\/ CE \\/ LE\",\"Made In\":\"America\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Test Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.20 gallons\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8-L L-4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Manual\",\"Transmission Gears\":\"5\",\"Driven Wheels\":\"Front-Wheel Drive\",\"Anti-Brake System\":\"Non-ABS 4-Wheel ABS\",\"Steering Type\":\"Rack & Pinion\",\"Curb Weight\":\"2590\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$13,563\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$14,990\"},\"success\":true,\"error\":\"\",\"vehicle\":\"2005 Toyota Corolla S\"}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-23 09:01:15', 1), | ||
(24, 3, '2018 Seat Leon', 'Leon', 'Seat', '2018', NULL, '{\"vehicle\":\"2018 Seat Leon\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Seat\",\"Trim\":\"\",\"Model\":\"Leon\",\"Engine\":\"\"}}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-16 12:08:53', 3), | (48, 3, '2005 Toyota Corolla S', 'Corolla', 'Toyota', '2005', '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"S\",\"Short Trim\":\"S\",\"Trim Variations\":\"S \\/ CE \\/ LE\",\"Made In\":\"America\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Test Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.20 gallons\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8-L L-4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Manual\",\"Transmission Gears\":\"5\",\"Driven Wheels\":\"Front-Wheel Drive\",\"Anti-Brake System\":\"Non-ABS 4-Wheel ABS\",\"Steering Type\":\"Rack & Pinion\",\"Curb Weight\":\"2590\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$13,563\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$14,990\"},\"success\":true,\"error\":\"\",\"vehicle\":\"2005 Toyota Corolla S\"}', 'DFRRI Road, Fimeama, Port Harcourt, Nigeria', '4.7790458', '7.0365156', '2019-01-23 08:54:31', 2), | ||
(25, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 08:24:15', 3), | (47, 3, '2015 Hyundai Sonata', 'Sonata', 'Hyundai', '2015', NULL, '{\"vehicle\":\"2015 Hyundai Sonata\",\"attributes\":{\"Year\":\"2015\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"United States \",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Passenger Car\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Sedan\",\"Doors\":\"4\",\"Fuel Type\":\"Gasoline\",\"Fuel Capacity\":\"\",\"City Mileage\":\"\",\"Highway Mileage\":\"\",\"Engine\":\"DOHC GDI THETA-II\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"\",\"Transmission Type\":\"\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"\",\"Anti-Brake System\":\"\",\"Steering Type\":\"\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"\",\"Overall Length\":\"\",\"Overall Width\":\"\",\"Standard Seating\":\"\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'DF-8, 2nd Avenue, DF Block, Sector 1, Salt Lake City, Kolkata, West Bengal 700064, India', '22.5920989', '88.4167945', '2019-01-23 08:51:56', 2), | ||
(26, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 08:48:12', 3), | (46, 3, '2017 Toyota Corolla', 'Corolla', 'Toyota', '2017', NULL, '{\"vehicle\":\"2017 Toyota Corolla\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"Canada\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Passenger Car\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Sedan\",\"Doors\":\"4\",\"Fuel Type\":\"Gasoline\",\"Fuel Capacity\":\"\",\"City Mileage\":\"\",\"Highway Mileage\":\"\",\"Engine\":\"2ZR-FE\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"4x2\",\"Anti-Brake System\":\"\",\"Steering Type\":\"\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"\",\"Overall Length\":\"\",\"Overall Width\":\"\",\"Standard Seating\":\"\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'V US-6, Walkerton, IN 46574, USA', '41.4669876', '-86.5005615', '2019-01-23 08:32:45', 2), | ||
(27, 3, '2019 Peugeot 307', '307', 'Peugeot', '2019', NULL, '{\"vehicle\":\"2019 Peugeot 307\",\"attributes\":{\"Year\":\"2019\",\"Make\":\"Peugeot\",\"Trim\":\"\",\"Model\":\"307\",\"Engine\":\"\"}}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-17 09:37:22', 3), | (45, 3, '2005 Toyota Corolla S', 'Corolla', 'Toyota', '2005', '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"S\",\"Short Trim\":\"S\",\"Trim Variations\":\"S \\/ CE \\/ LE\",\"Made In\":\"America\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Test Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.20 gallons\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8-L L-4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Manual\",\"Transmission Gears\":\"5\",\"Driven Wheels\":\"Front-Wheel Drive\",\"Anti-Brake System\":\"Non-ABS 4-Wheel ABS\",\"Steering Type\":\"Rack & Pinion\",\"Curb Weight\":\"2590\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$13,563\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$14,990\"},\"success\":true,\"error\":\"\",\"vehicle\":\"2005 Toyota Corolla S\"}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-23 08:32:19', 2), | ||
(28, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:39:08', 3), | (43, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-23 07:24:51', 3), | ||
(29, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:43:16', 3), | (44, 3, '2018 Hyundai Sonata', 'Sonata', 'Hyundai', '2018', NULL, '{\"vehicle\":\"2018 Hyundai Sonata\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"United States \",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Passenger Car\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Sedan\",\"Doors\":\"4\",\"Fuel Type\":\"Gasoline\",\"Fuel Capacity\":\"\",\"City Mileage\":\"\",\"Highway Mileage\":\"\",\"Engine\":\"GDI THETA-II\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"FWD\\/Front Wheel Drive\",\"Anti-Brake System\":\"Standard\",\"Steering Type\":\"\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"\",\"Overall Length\":\"\",\"Overall Width\":\"\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'X US-64, Farmington, NM 87401, USA', '36.7151849', '-108.1481245', '2019-01-23 08:27:20', 2), | ||
(30, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:44:33', 3), | (42, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"South Korea\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Sedan\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Sedan\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallons\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"Regular Unleaded I-4 2.4 L\\/144\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic w\\/OD\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"Front-Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"\",\"Curb Weight\":\"3250\",\"Gross Weight\":\"\",\"Overall Height\":\"58.1 inches\",\"Overall Length\":\"191.1 inches\",\"Overall Width\":\"73.4 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-23 07:16:43', 2), | ||
(31, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:47:07', 3), | (41, 3, '2018 Hyundai Sonata', 'Sonata', 'Hyundai', '2018', NULL, '{\"vehicle\":\"2018 Hyundai Sonata\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"United States \",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Passenger Car\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Sedan\",\"Doors\":\"4\",\"Fuel Type\":\"Gasoline\",\"Fuel Capacity\":\"\",\"City Mileage\":\"\",\"Highway Mileage\":\"\",\"Engine\":\"GDI THETA-II\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"FWD\\/Front Wheel Drive\",\"Anti-Brake System\":\"Standard\",\"Steering Type\":\"\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"\",\"Overall Length\":\"\",\"Overall Width\":\"\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'Tr??c 71 Hai Bà Tr?ng, C?a Nam, Hoàn Ki?m, Hà N?i, Vietnam', '21.027065', '105.843043', '2019-01-23 05:43:03', 2), | ||
(32, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 05:13:09', 3), | (40, 3, '2017 Dacia Duster', 'Duster', 'Dacia', '2017', NULL, '{\"vehicle\":\"2017 Dacia Duster\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Dacia\",\"Trim\":\"\",\"Model\":\"Duster\",\"Engine\":\"\"}}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-23 05:16:35', 3); | ||
(33, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"South Korea\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Sedan\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallons\",\"City Mileage\":\"22 miles\\/gallon\",\"Highway Mileage\":\"31 miles\\/gallon\",\"Engine\":\"Intercooled Turbo Regular Unleaded I-4 2.0 L\\/122\",\"Engine Size\":\"2-L\",\"Engine Cylinders\":\"4-Cylinder\",\"Transmission Type\":\"Automatic w\\/OD\",\"Transmission Gears\":\"6-Speed\",\"Driven Wheels\":\"Front-Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"Rack & Pinion\",\"Curb Weight\":\"3492 pounds\",\"Gross Weight\":\"\",\"Overall Height\":\"58.1 inches\",\"Overall Length\":\"191.1 inches\",\"Overall Width\":\"73.4 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"$26,600\"},\"success\":true,\"error\":\"\"}', 'Tr??c 71 Hai Bà Tr?ng, C?a Nam, Hoàn Ki?m, Hà N?i, Vietnam', '21.027065', '105.843043', '2019-01-18 05:29:16', 1), | |||
(34, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:18:49', 3), | -- -------------------------------------------------------- | ||
(35, 3, '2017 Citroën C5 Break', 'C5 Break', 'Citroën', '2017', NULL, '{\"vehicle\":\"2017 Citro\\u00ebn C5 Break\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Citro\\u00ebn\",\"Trim\":\"\",\"Model\":\"C5 Break\",\"Engine\":\"\"}}', 'FG-1 76-B, Maya Apartments Rd, Block FG1, Vikaspuri, Delhi, 110018, India', '28.642685', '77.0700741', '2019-01-18 06:27:05', 3), | |||
(36, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:27:22', 3), | -- | ||
(37, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:28:35', 3), | -- Table structure for table `custom_quote` | ||
(38, 3, '2018 Peugeot 307 SW', '307 SW', 'Peugeot', '2018', NULL, '{\"vehicle\":\"2018 Peugeot 307 SW\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Peugeot\",\"Trim\":\"\",\"Model\":\"307 SW\",\"Engine\":\"\"}}', 'BG-510, Bawana Rd, Block BG, Sanjay Gandhi Transport Nagar, Delhi, 110042, India', '28.738923', '77.148339', '2019-01-18 06:28:59', 3), | -- | ||
(39, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:38:54', 3); | |||
CREATE TABLE `custom_quote` ( | |||
`custom_id` int(11) NOT NULL, | |||
`booking_id` int(11) DEFAULT NULL, | |||
`custom_service_quote` longtext, | |||
`custom_amount` double DEFAULT NULL, | |||
`status` tinyint(3) DEFAULT '1' | |||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | |||
-- | |||
-- Dumping data for table `custom_quote` | |||
-- | |||
INSERT INTO `custom_quote` (`custom_id`, `booking_id`, `custom_service_quote`, `custom_amount`, `status`) VALUES | |||
(2, 1, '[{\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"description\":\"fgh\",\"amount\":\"54\"},{\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"description\":\"fghfg\",\"amount\":\"45\"},{\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"description\":\"h\",\"amount\":\"45\"}]', 144, 1), | |||
(3, 2, '[{\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"description\":\"gyhu\",\"amount\":\"452\"},{\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"description\":\"ghju\",\"amount\":\"45345\"},{\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"description\":\"ghj\",\"amount\":\"4532\"}]', 50329, 1), | |||
(4, 3, '[{\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"description\":\"yui\",\"amount\":\"67\"},{\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"description\":\"uyiy\",\"amount\":\"676\"},{\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"description\":\"yiuyiyui\",\"amount\":\"67\"}]', 810, 1); | |||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -212,7 +259,7 @@ CREATE TABLE `issues` ( | ... | @@ -212,7 +259,7 @@ CREATE TABLE `issues` ( |
`issue_id` int(11) NOT NULL, | `issue_id` int(11) NOT NULL, | ||
`issue` varchar(500) NOT NULL, | `issue` varchar(500) NOT NULL, | ||
`issue_image` varchar(500) DEFAULT NULL, | `issue_image` varchar(500) DEFAULT NULL, | ||
`status` tinyint(3) NOT NULL DEFAULT '1' | `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '0-Inactive,1-Active,2-Delete' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
-- | -- | ||
... | @@ -222,9 +269,9 @@ CREATE TABLE `issues` ( | ... | @@ -222,9 +269,9 @@ CREATE TABLE `issues` ( |
INSERT INTO `issues` (`issue_id`, `issue`, `issue_image`, `status`) VALUES | INSERT INTO `issues` (`issue_id`, `issue`, `issue_image`, `status`) VALUES | ||
(9, 'Wheel Maintenance', 'assets/uploads/services/images8.jpg', 2), | (9, 'Wheel Maintenance', 'assets/uploads/services/images8.jpg', 2), | ||
(10, 'AC Maintenance', 'assets/uploads/services/car_ac.jpg', 2), | (10, 'AC Maintenance', 'assets/uploads/services/car_ac.jpg', 2), | ||
(11, 'Oil Change and General Service', 'assets/uploads/services/images9.jpg', 1), | (11, 'Oil Change and General Service', 'assets/uploads/services/[email protected]g', 1), | ||
(12, 'General Service', 'assets/uploads/services/Twitch_KingpinSkin_old2_HD1.jpg', 1), | (12, 'General Service', 'assets/uploads/services/[email protected]g', 1), | ||
(13, 'Oil Change and General Service (Free Water Service and Polishing).', 'assets/uploads/services/Himalayan.jpg', 1); | (13, 'Oil Change and General Service (Free Water Service and Polishing).', 'assets/uploads/services/[email protected]g', 1); | ||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -239,7 +286,7 @@ CREATE TABLE `issues_category` ( | ... | @@ -239,7 +286,7 @@ CREATE TABLE `issues_category` ( |
`issue_cat_image` varchar(500) DEFAULT NULL, | `issue_cat_image` varchar(500) DEFAULT NULL, | ||
`default_service_fee` double DEFAULT NULL, | `default_service_fee` double DEFAULT NULL, | ||
`default_description` longtext, | `default_description` longtext, | ||
`status` tinyint(3) NOT NULL DEFAULT '1' | `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '0-Inactive,1-Active,2-Delete' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
-- | -- | ||
... | @@ -251,7 +298,8 @@ INSERT INTO `issues_category` (`issue_cat_id`, `issue_id`, `issue_category`, `is | ... | @@ -251,7 +298,8 @@ INSERT INTO `issues_category` (`issue_cat_id`, `issue_id`, `issue_category`, `is |
(8, 11, 'Oil Top Up ', 'assets/uploads/services/Himalayan1.jpg', 500, 'Oil Top Up and general service with free water service. ', 1), | (8, 11, 'Oil Top Up ', 'assets/uploads/services/Himalayan1.jpg', 500, 'Oil Top Up and general service with free water service. ', 1), | ||
(9, 12, 'General Service L:0', 'assets/uploads/services/park-512.png', 700, 'With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. ', 1), | (9, 12, 'General Service L:0', 'assets/uploads/services/park-512.png', 700, 'With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. ', 1), | ||
(10, 12, 'General Service L:1', 'assets/uploads/services/car.jpg', 700, 'Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. ', 1), | (10, 12, 'General Service L:1', 'assets/uploads/services/car.jpg', 700, 'Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. ', 1), | ||
(11, 13, 'Oil Change and General Service', 'assets/uploads/services/orig.jpg', 1500, 'Oil Change and General Service without free water service. Oil Change and General Service without free water service. Oil Change and General Service without free water service. ', 1); | (11, 13, 'Oil Change and General Service', 'assets/uploads/services/orig.jpg', 1500, 'Oil Change and General Service without free water service. Oil Change and General Service without free water service. Oil Change and General Service without free water service. ', 1), | ||
(12, 13, 'Oil Change and General Service', 'assets/uploads/services/Audi-r8.jpg', 580, 'Oil Change and General Service', 1); | |||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -285,11 +333,11 @@ CREATE TABLE `mechanic` ( | ... | @@ -285,11 +333,11 @@ CREATE TABLE `mechanic` ( |
-- | -- | ||
INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name`, `email_id`, `phone`, `address`, `city`, `state`, `licence`, `licence_number`, `licence_exp_date`, `location`, `location_lat`, `location_lng`, `start_time`, `end_time`) VALUES | INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name`, `email_id`, `phone`, `address`, `city`, `state`, `licence`, `licence_number`, `licence_exp_date`, `location`, `location_lat`, `location_lng`, `start_time`, `end_time`) VALUES | ||
(1, 2, 0, 'Tobin', 'Thomas', '[email protected]', '9995559194', 'Techware Software Solution', 'Ernakulam', 'Kerala', 'assets/uploads/services/1546929651_1523012036_hj.jpg', 'LI000515456', '01/29/2019', 'FL, USA', '27.6648274', '-81.5157535', '10:00', '17:00'), | (1, 2, 0, 'ol', 'lk', '[email protected]', '9995559194', 'Techware Software Solution', 'Ernakulam', 'Kerala', 'assets/uploads/services/1546929651_1523012036_hj.jpg', 'LI000515456', '01/29/2019', 'FL, USA', '27.6648274', '-81.5157535', '10:00', '17:00'), | ||
(5, 11, 0, 'kjo', 'kjo', 'tobin.techw[email protected]', '34653456344456', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091718_sniper.jpg', 'dfrgdersgt', '12/13/2018', 'Fort Lauderdale, FL, USA', '26.1224386', '-80.1373174', '06:30', '13:55'), | (5, 11, 0, 'uiou', 'ouji8o', 'lnkjl[email protected]', '34653456344456', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091718_sniper.jpg', 'dfrgdersgt', '12/13/2018', 'Fort Lauderdale, FL, USA', '26.1224386', '-80.1373174', '06:30', '13:55'), | ||
(6, 12, 0, 'Driver', 'john', 'tobin[email protected]', '9995551234', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091568_1523012036_hj.jpg', 'LI00051545', '12/25/2018', NULL, NULL, NULL, NULL, NULL), | (6, 12, 0, 'Driver', 'john', '5545[email protected]', '9995551234', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091568_1523012036_hj.jpg', 'LI00051545', '12/25/2018', NULL, NULL, NULL, NULL, NULL), | ||
(7, 13, 1, 'Jensa', 'Jose', '[email protected]', '9995559856', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1546851554_1523012036_hj.jpg', 'LI0005154', '01/30/2019', 'Grand Rapids, MI, USA', '42.9633599', '-85.6680863', NULL, NULL), | (7, 13, 0, 'Jensa', 'Jose', '[email protected]', '9995559856', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1546851554_1523012036_hj.jpg', 'LI0005154', '01/30/2019', 'Grand Rapids, MI, USA', '42.9633599', '-85.6680863', '08:00', '20:00'), | ||
(8, 14, 0, 'Tobin', 'Thomas', 'tobin.techwarr4rt[email protected]', '9934534594', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1546929755_1523012036_hj1.jpg', 'LI000515456', '01/29/2019', 'J K O\'Donnell\'s, West Wayne Street, Fort Wayne, IN, USA', '41.0780191', '-85.1402719', '10:00', '17:00'); | (8, 14, 0, 'Driver', 'jio', 'tobin.techwar[email protected]', '9934534594', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1546929755_1523012036_hj1.jpg', 'LI000515456', '01/29/2019', 'J K O\'Donnell\'s, West Wayne Street, Fort Wayne, IN, USA', '41.0780191', '-85.1402719', '10:00', '17:00'); | ||
-- -------------------------------------------------------- | -- -------------------------------------------------------- | ||
... | @@ -370,7 +418,7 @@ CREATE TABLE `setting` ( | ... | @@ -370,7 +418,7 @@ CREATE TABLE `setting` ( |
-- | -- | ||
INSERT INTO `setting` (`id`, `title`, `title_short`, `site_logo`, `fav_icon`, `country_flag`, `currency`, `smtp_host`, `smtp_username`, `smtp_password`, `google_api_key`, `vin_audit_url`, `vin_audit_api`) VALUES | INSERT INTO `setting` (`id`, `title`, `title_short`, `site_logo`, `fav_icon`, `country_flag`, `currency`, `smtp_host`, `smtp_username`, `smtp_password`, `google_api_key`, `vin_audit_url`, `vin_audit_api`) VALUES | ||
(1, 'd-Car Fixers', 'd-CarFixers', 'assets/uploads/services/1539680946_1523012036_hj.jpg', 'assets/uploads/services/1539680946_1523540473_guenstig_reifen.png', 'US', 'USD', '[email protected]', 'AIzaSyC9JX3BZZfx2S6GQieC_PqjuJdUbZ7_wyM1', 'Golden_1234', 'AIzaSyCcc-YDSJyDpehNE6qfntfWpEQ4uS4aq6A', 'https://specifications.vinaudit.com/getspecifications.php', 'VA_DEMO_KEY'); | (1, 'Dcarfixxers', 'Dcar', 'assets/uploads/services/1549257477_Twitch_KingpinSkin_old2_HD.jpg', 'assets/uploads/services/1549257477_sniper.jpg', 'US', 'USD', '[email protected]', 'AIzaSyC9JX3BZZfx2S6GQieC_PqjuJdUbZ7_wyM1', 'Golden_1234', 'AIzaSyCcc-YDSJyDpehNE6qfntfWpEQ4uS4aq6A', 'https://specifications.vinaudit.com/getspecifications.php', 'VA_DEMO_KEY'); | ||
-- | -- | ||
-- Indexes for dumped tables | -- Indexes for dumped tables | ||
... | @@ -383,6 +431,12 @@ ALTER TABLE `admin_users` | ... | @@ -383,6 +431,12 @@ ALTER TABLE `admin_users` |
ADD PRIMARY KEY (`id`); | ADD PRIMARY KEY (`id`); | ||
-- | -- | ||
-- Indexes for table `authtable` | |||
-- | |||
ALTER TABLE `authtable` | |||
ADD PRIMARY KEY (`id`); | |||
-- | |||
-- Indexes for table `bookings` | -- Indexes for table `bookings` | ||
-- | -- | ||
ALTER TABLE `bookings` | ALTER TABLE `bookings` | ||
... | @@ -401,6 +455,12 @@ ALTER TABLE `customer_vehicle` | ... | @@ -401,6 +455,12 @@ ALTER TABLE `customer_vehicle` |
ADD PRIMARY KEY (`customer_veh_id`); | ADD PRIMARY KEY (`customer_veh_id`); | ||
-- | -- | ||
-- Indexes for table `custom_quote` | |||
-- | |||
ALTER TABLE `custom_quote` | |||
ADD PRIMARY KEY (`custom_id`); | |||
-- | |||
-- Indexes for table `forgot_password_link` | -- Indexes for table `forgot_password_link` | ||
-- | -- | ||
ALTER TABLE `forgot_password_link` | ALTER TABLE `forgot_password_link` | ||
... | @@ -453,6 +513,12 @@ ALTER TABLE `admin_users` | ... | @@ -453,6 +513,12 @@ ALTER TABLE `admin_users` |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; | ||
-- | -- | ||
-- AUTO_INCREMENT for table `authtable` | |||
-- | |||
ALTER TABLE `authtable` | |||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; | |||
-- | |||
-- AUTO_INCREMENT for table `bookings` | -- AUTO_INCREMENT for table `bookings` | ||
-- | -- | ||
ALTER TABLE `bookings` | ALTER TABLE `bookings` | ||
... | @@ -462,13 +528,19 @@ ALTER TABLE `bookings` | ... | @@ -462,13 +528,19 @@ ALTER TABLE `bookings` |
-- AUTO_INCREMENT for table `customers` | -- AUTO_INCREMENT for table `customers` | ||
-- | -- | ||
ALTER TABLE `customers` | ALTER TABLE `customers` | ||
MODIFY `customer_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; | MODIFY `customer_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; | ||
-- | -- | ||
-- AUTO_INCREMENT for table `customer_vehicle` | -- AUTO_INCREMENT for table `customer_vehicle` | ||
-- | -- | ||
ALTER TABLE `customer_vehicle` | ALTER TABLE `customer_vehicle` | ||
MODIFY `customer_veh_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40; | MODIFY `customer_veh_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=63; | ||
-- | |||
-- AUTO_INCREMENT for table `custom_quote` | |||
-- | |||
ALTER TABLE `custom_quote` | |||
MODIFY `custom_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; | |||
-- | -- | ||
-- AUTO_INCREMENT for table `forgot_password_link` | -- AUTO_INCREMENT for table `forgot_password_link` | ||
... | @@ -486,7 +558,7 @@ ALTER TABLE `issues` | ... | @@ -486,7 +558,7 @@ ALTER TABLE `issues` |
-- AUTO_INCREMENT for table `issues_category` | -- AUTO_INCREMENT for table `issues_category` | ||
-- | -- | ||
ALTER TABLE `issues_category` | ALTER TABLE `issues_category` | ||
MODIFY `issue_cat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; | MODIFY `issue_cat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; | ||
-- | -- | ||
-- AUTO_INCREMENT for table `mechanic` | -- AUTO_INCREMENT for table `mechanic` | ||
... | ... |