Commit 2557a8f3 by Tobin

daily commit

parent 8cce08d9
...@@ -6,7 +6,7 @@ class Vehicle extends CI_Controller { ...@@ -6,7 +6,7 @@ class Vehicle extends CI_Controller {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
date_default_timezone_set("Asia/Kolkata"); date_default_timezone_set("Asia/Kolkata");
// $this->load->model('Vechicle_model'); $this->load->model('Vehicle_model');
if(!$this->session->userdata('logged_in')) { if(!$this->session->userdata('logged_in')) {
redirect(base_url()); redirect(base_url());
...@@ -15,11 +15,13 @@ class Vehicle extends CI_Controller { ...@@ -15,11 +15,13 @@ class Vehicle extends CI_Controller {
public function vehicleSearch(){ public function vehicleSearch(){
$return_arr = array('status'=>'0'); $return_arr = array('status'=>'0');
if(!isset($_POST) || empty($_POST) || !isset($_POST['searchType']) || empty($_POST['searchType'])){ if(!isset($_POST) || empty($_POST) || !isset($_POST['searchType']) || empty($_POST['searchType']) ||
!isset($_POST['vehLocation']) || empty($vehLocation = $_POST['vehLocation'])){
echo json_encode($return_arr);exit; echo json_encode($return_arr);exit;
} }
$param = ""; $param = "";
$searchType = $_POST['searchType']; $searchType = $_POST['searchType'];
$vehicle_data = array('car_location'=>$vehLocation);
$this->load->model('Settings_model'); $this->load->model('Settings_model');
$settings = $this->Settings_model->settings_viewing(); $settings = $this->Settings_model->settings_viewing();
...@@ -28,12 +30,17 @@ class Vehicle extends CI_Controller { ...@@ -28,12 +30,17 @@ class Vehicle extends CI_Controller {
isset($_POST['vehYear']) && !empty($_POST['vehYear']) && isset($_POST['vehYear']) && !empty($_POST['vehYear']) &&
isset($_POST['vehModel']) && !empty($_POST['vehModel']) && isset($_POST['vehModel']) && !empty($_POST['vehModel']) &&
isset($_POST['vehMaker']) && !empty($_POST['vehMaker'])){ isset($_POST['vehMaker']) && !empty($_POST['vehMaker'])){
$vehicle_data['car_maker'] = $_POST['vehMaker'];
$vehicle_data['car_model'] = $_POST['vehModel'];
$vehicle_data['car_model_year'] = $_POST['vehYear'];
$param = "?format=json&key=".urlencode($settings['vin_audit_api'])."&year=". $param = "?format=json&key=".urlencode($settings['vin_audit_api'])."&year=".
urlencode($_POST['vehYear'])."&make=".urlencode($_POST['vehMaker'])."&model=". urlencode($_POST['vehYear'])."&make=".urlencode($_POST['vehMaker'])."&model=".
urlencode($_POST['vehModel']); urlencode($_POST['vehModel']);
} }
else if($searchType == 2 && isset($_POST['vehVin']) && !empty($_POST['vehVin'])){ else if($searchType == 2 && isset($_POST['vehVin']) && !empty($_POST['vehVin'])){
$vehicle_data['car_vin'] = $_POST['vehVin'];
$param = "?format=json&key=".urlencode($settings['vin_audit_api']). $param = "?format=json&key=".urlencode($settings['vin_audit_api']).
"&vin=".urlencode($_POST['vehVin']); "&vin=".urlencode($_POST['vehVin']);
} }
...@@ -46,10 +53,35 @@ class Vehicle extends CI_Controller { ...@@ -46,10 +53,35 @@ class Vehicle extends CI_Controller {
$return_arr['status'] = 2; $return_arr['status'] = 2;
echo json_encode($return_arr);exit; echo json_encode($return_arr);exit;
} }
$return_arr['status'] = '1'; $lat_lng = getLocationLatLng($vehLocation);
$return_arr['veh_data'] = $vehData; if(empty($lat_lng)){
$return_arr['status'] = 3;
echo json_encode($return_arr);exit;
}
$vehicle_data['car_name'] = $vehData['vehicle'];
$vehicle_data['car_loc_lat'] = $lat_lng['lat'];
$vehicle_data['car_loc_lng'] = $lat_lng['lng'];
$vehicle_data['vehicle_data'] = json_encode($vehData);
$car_id = $this->Vehicle_model->addVehicle($vehicle_data);
if(!empty($car_id)){
$return_arr['status'] = '1';
$return_arr['car_id'] = $car_id;
$return_arr['veh_data'] = $vehData;
}
} }
echo json_encode($return_arr);exit; echo json_encode($return_arr);exit;
} }
function updateUserCarStatus(){
$return_arr = array('status'=>'0');
if(!isset($_POST) || empty($_POST) ||
!isset($_POST['car_id']) || empty($car_id = $_POST['car_id']) ||
!isset($_POST['action']) || empty($action = $_POST['action'])){
echo json_encode($return_arr); exit;
}
$return_arr['status'] = $this->Vehicle_model->changeStatus($car_id,$action);
echo json_encode($return_arr); exit;
}
} }
?> ?>
\ No newline at end of file
...@@ -66,4 +66,28 @@ ...@@ -66,4 +66,28 @@
$decode = trim(base64_decode(urldecode($decode)),'{*}'); $decode = trim(base64_decode(urldecode($decode)),'{*}');
return $decode; return $decode;
} }
function getLocationLatLng($location = ''){
$settings = getSettings();
if(empty($location) || empty($settings) || !isset($settings['google_api_key']) ||
empty($gKey = $settings['google_api_key'])){
return 0;
}
$thisObj = & get_instance();
$locData = file_get_contents("https://maps.google.com/maps/api/geocode/json?address=".
urlencode($location)."&sensor=false&key=".$gKey);
if(empty($locData))
return 0;
$loc_data = json_decode($locData);
if(empty($loc_data) || !isset($loc_data->status) || $loc_data->status != 'OK')
return 0;
$locArr['lat'] = $loc_data->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
$locArr['lng'] = $loc_data->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};
if(empty($locArr['lat']) || empty($locArr['lng']))
return 0;
return $locArr;
}
?> ?>
\ No newline at end of file
<?php
class Vehicle_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
function addVehicle($vehicle_data = array()){
if(empty($vehicle_data)){
return 0;
}
$status = $this->db->insert('customer_vehicle',$vehicle_data);
return ($status)?$this->db->insert_id():'0';
}
function changeStatus($vehicle_id = '', $action = '0'){
if(empty($vehicle_id)){
return 0;
}
if($action == 3){
$status = $this->db->delete('customer_vehicle',array('customer_veh_id'=>$vehicle_id));
} else {
$status = $this->db->update('customer_vehicle',array('status'=>$action),
array('customer_veh_id'=>$vehicle_id));
}
return $status;
}
}
?>
\ No newline at end of file
...@@ -95,7 +95,102 @@ ...@@ -95,7 +95,102 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-12 padBottom20">
<div class="col-md-12 padBottom20" id="savedVehiclesCntr">
</div>
</div>
</form>
<div class="box-header with-border">
<h3 class="box-title">Add New Vehicles</h3>
</div>
<br>
<!-- Vehicle Details START -->
<form id="CarSearchForm">
<div class="col-md-12">
<div class="col-md-3">
<label>
<input id="search_key_type" type="radio" name="search_key_type" value='1' checked>
<span class="padAll-20">Vechile Details</span>
</label>
</div>
<div class="col-md-9">
<label>
<input id="search_key_type" type="radio" name="search_key_type" value='2'>
<span class="padAll-20">VIN Number</span>
</label>
</div>
</div>
<!-- Search Box START -->
<div class="col-md-12 padAll-20">
<div class="col-md-8">
<!-- Vehicle Details Search START -->
<div id="searchTyp_1">
<div class="col-md-12">
<div class="col-md-6">
<label>Vehicle Model</label>
<input type="text" class="form-control required" name="vehModel" input="search_params"
placeholder="Enter Vehicle Model" required="">
</div>
<div class="col-md-6">
<label>Vehicle Maker</label>
<input type="text" class="form-control required" name="vehMaker" input="search_params"
placeholder="Enter Vehicle Maker" required>
</div>
</div>
<div class="col-md-12 padTop10">
<div class="col-md-6">
<label>Vehicle Model Year</label>
<select name="vehYear" class="form-control required" input="search_params"
data-parsley-trigger="change" required="">
<option selected disabled value="">Choose Vehicle Model Year</option>
<?php
for($year=date('Y'); $year>=1950; $year--){
$cond = (isset($vehicle_data) && isset($vehicle_data->model) &&
!empty($vehicle_data->model) &&
$vehicle_data->model == $year)?'selected':'';
echo '<option '.$cond.' value="'.$year.'">'.$year.'</option>';
}
?>
</select>
</div>
<div class="col-md-6">
<label>Vehicle Location</label>
<input type="text" class="form-control required" name="vehLocation"
id="loc_search_1" input="search_params" placeholder="Enter Vehicle Location" required>
</div>
</div>
</div>
<!-- Vehicle Details Search END -->
<!-- Vehicle Vin Search START -->
<div id="searchTyp_2" class="hide">
<div class="col-md-12">
<div class="col-md-12">
<label>Vehicle VIN Number</label>
<input type="text" class="form-control" name="vehVin" input="search_params"
placeholder="Enter Vehicle VIN Number">
</div>
<div class="col-md-12 padTop10">
<label>Vehicle Location</label>
<input type="text" class="form-control" name="vehLocation"
id="loc_search_2" input="search_params" placeholder="Enter Vehicle Location">
</div>
</div>
</div>
<!-- Vehicle Vin Search END -->
</div>
<!-- Search Box END -->
<div class="col-md-4">
<button id="vehSearch" type="button" class="btn btn-info" style="margin-top:18%;">Search</button>
</div>
</div>
<!-- Vehicle Details END -->
</form> </form>
<!-- View Car DEtails START -->
<div class="col-md-12 padBottom20 hide" id="carSearchResult"></div>
<!-- View Car DEtails END -->
<div class="col-md-12"> <div class="col-md-12">
<div class="box-footer"> <div class="box-footer">
<div style="text-align: center;"> <div style="text-align: center;">
...@@ -108,4 +203,4 @@ ...@@ -108,4 +203,4 @@
</div> </div>
</div> </div>
</section> </section>
</div> </div>
\ No newline at end of file
...@@ -89,83 +89,4 @@ ...@@ -89,83 +89,4 @@
</div> </div>
</div> </div>
</section> </section>
</div>
<div class="hide" id="vechileAddHtml">
<!-- Vehicle Details START -->
<form name="vechile_search_form" id="CarSearchForm">
<div class="col-md-12">
<div class="col-md-3">
<label>
<input id="search_key_type" type="radio" name="search_key_type" value='1' checked>
<span class="padAll-20">Vechile Details</span>
</label>
</div>
<div class="col-md-9">
<label>
<input id="search_key_type" type="radio" name="search_key_type" value='2'>
<span class="padAll-20">VIN Number</span>
</label>
</div>
</div>
<!-- Search Box START -->
<div class="col-md-12 padAll-20">
<div class="col-md-8">
<!-- Vehicle Details Search START -->
<div id="searchTyp_1">
<div class="col-md-12">
<div class="col-md-12">
<label>Vehicle Model</label>
<input type="text" class="form-control required" name="vehModel" input="search_params"
placeholder="Enter Vehicle Model" required="">
</div>
</div>
<div class="col-md-12 padTop10">
<div class="col-md-6">
<label>Vehicle Maker</label>
<input type="text" class="form-control required" name="vehMaker" input="search_params"
placeholder="Enter Vehicle Maker" required>
</div>
<div class="col-md-6">
<label>Year of Manufactured</label>
<select name="vehYear" class="form-control required" input="search_params"
data-parsley-trigger="change" required="">
<option selected disabled value="">Choose Vehicle Purchase Year</option>
<?php
for($year=date('Y'); $year>=1950; $year--){
$cond = (isset($vehicle_data) && isset($vehicle_data->model) &&
!empty($vehicle_data->model) &&
$vehicle_data->model == $year)?'selected':'';
echo '<option '.$cond.' value="'.$year.'">'.$year.'</option>';
}
?>
</select>
</div>
</div>
</div>
<!-- Vehicle Details Search END -->
<!-- Vehicle Vin Search START -->
<div id="searchTyp_2" class="hide">
<div class="col-md-12">
<div class="col-md-12">
<label>Vehicle VIN Number</label>
<input type="text" class="form-control" name="vehVin" input="search_params"
placeholder="Enter Vehicle VIN Number">
</div>
</div>
</div>
<!-- Vehicle Vin Search END -->
</div>
<!-- Search Box END -->
<div class="col-md-4">
<button type="submit" class="btn btn-info" style="margin-top:22px;">Search</button>
</div>
</div>
<!-- Vehicle Details END -->
</form>
<!-- View Car DEtails START -->
<div class="col-md-12 hide" id="CarSearchResult"></div>
<!-- View Car DEtails END -->
</div> </div>
\ No newline at end of file
...@@ -312,6 +312,10 @@ ...@@ -312,6 +312,10 @@
padding-top:20px !important; padding-top:20px !important;
} }
.padBottom20 {
padding-bottom:20px !important;
}
.padTop10 { .padTop10 {
padding-top:10px !important; padding-top:10px !important;
} }
...@@ -340,7 +344,7 @@ ...@@ -340,7 +344,7 @@
text-align:center; text-align:center;
} }
.padAll-20 { .padAll-10 {
padding: 10px; padding: 10px;
} }
...@@ -365,4 +369,16 @@ ...@@ -365,4 +369,16 @@
.disp-block { .disp-block {
display:block !important; display:block !important;
}
.margin-all {
margin: 5px;
}
.marginBottom-5 {
margin-bottom: 5px;
}
.marginBottom-10 {
margin-bottom: 10px;
} }
\ No newline at end of file
...@@ -73,6 +73,25 @@ function viewImageModal(title,img_src){ ...@@ -73,6 +73,25 @@ function viewImageModal(title,img_src){
modalTrigger(title,body_html); modalTrigger(title,body_html);
} }
function initLocSearch_1() {
var input = document.getElementById('loc_search_1');
var options = {componentRestrictions: {country: country_flag}};
var autocomplete = new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window,'load',initLocSearch_1);
function initLocSearch_2() {
var input = document.getElementById('loc_search_2');
var options = {componentRestrictions: {country: country_flag}};
var autocomplete = new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window,'load',initLocSearch_2);
function initLocSearch_3() {
var input = document.getElementById('loc_search_3');
var options = {componentRestrictions: {country: country_flag}};
var autocomplete = new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window,'load',initLocSearch_3);
jQuery('[id="viewMechanic"]').on('click',function() { jQuery('[id="viewMechanic"]').on('click',function() {
var mechanic_id = jQuery(this).attr('mechanic_id'); var mechanic_id = jQuery(this).attr('mechanic_id');
...@@ -401,9 +420,11 @@ jQuery('[id="createCustomerSubmit"]').on('click',function() { ...@@ -401,9 +420,11 @@ jQuery('[id="createCustomerSubmit"]').on('click',function() {
jQuery('[id="createCustomerForm"]').submit(); jQuery('[id="createCustomerForm"]').submit();
}); });
jQuery('[name="vechile_search_form"]').on('submit',function(event) { jQuery('[id="vehSearch"]').on('click',function(event) {
event.preventDefault(); event.preventDefault();
if(!jQuery('[id="CarSearchForm"]').parsley().validate()){
return false;
}
var searchTypId = jQuery('input[name=search_key_type]:checked').val(), var searchTypId = jQuery('input[name=search_key_type]:checked').val(),
passArr = {'searchType':'','vehModel':'','vehMaker':'','vehYear':'','vehVin':''}; passArr = {'searchType':'','vehModel':'','vehMaker':'','vehYear':'','vehVin':''};
if(searchTypId == '' || searchTypId == null || searchTypId == 'null' || searchTypId == undefined || searchTypId == 'undefined'){ if(searchTypId == '' || searchTypId == null || searchTypId == 'null' || searchTypId == undefined || searchTypId == 'undefined'){
...@@ -414,7 +435,9 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) { ...@@ -414,7 +435,9 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) {
vehYear = jQuery('[name="vehYear"]').val(), vehYear = jQuery('[name="vehYear"]').val(),
vehModel = jQuery('[name="vehModel"]').val(), vehModel = jQuery('[name="vehModel"]').val(),
vehMaker = jQuery('[name="vehMaker"]').val(); vehMaker = jQuery('[name="vehMaker"]').val();
if((searchTypId == 1 && vehLocation = jQuery('[name="vehLocation"]').val();
if((vehLocation == '' || vehLocation == null || vehLocation == 'null' || vehLocation == undefined || vehLocation == 'undefined') ||
(searchTypId == 1 &&
(vehYear == '' || vehYear == null || vehYear == 'null' || vehYear == undefined || vehYear == 'undefined' || (vehYear == '' || vehYear == null || vehYear == 'null' || vehYear == undefined || vehYear == 'undefined' ||
vehModel == '' || vehModel == null || vehModel == 'null' || vehModel == undefined || vehModel == 'undefined' || vehModel == '' || vehModel == null || vehModel == 'null' || vehModel == undefined || vehModel == 'undefined' ||
vehMaker == '' || vehMaker == null || vehMaker == 'null' || vehMaker == undefined || vehMaker == 'undefined') vehMaker == '' || vehMaker == null || vehMaker == 'null' || vehMaker == undefined || vehMaker == 'undefined')
...@@ -431,6 +454,7 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) { ...@@ -431,6 +454,7 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) {
passArr.vehModel = vehModel; passArr.vehModel = vehModel;
passArr.vehMaker = vehMaker; passArr.vehMaker = vehMaker;
passArr.searchType = searchTypId; passArr.searchType = searchTypId;
passArr.vehLocation = vehLocation;
jQuery.ajax({ jQuery.ajax({
url : base_url+"Vehicle/vehicleSearch", url : base_url+"Vehicle/vehicleSearch",
...@@ -443,16 +467,21 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) { ...@@ -443,16 +467,21 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) {
return false; return false;
} }
var resp_data = jQuery.parseJSON(resp); var resp_data = jQuery.parseJSON(resp);
if(resp_data['status'] != '1' || (resp_data['status'] == 1 && resp_data['veh_data'] == '' || resp_data['veh_data'] == null || resp_data['veh_data'] == undefined || resp_data['veh_data'] == 'null' || resp_data['veh_data'] == 'undefined')){ if(resp_data['status'] != '1' || (resp_data['status'] == 1 && resp_data['veh_data'] == '' || resp_data['veh_data'] == null || resp_data['veh_data'] == undefined || resp_data['veh_data'] == 'null' || resp_data['veh_data'] == 'undefined' || resp_data['car_id'] == '' || resp_data['car_id'] == null || resp_data['car_id'] == undefined || resp_data['car_id'] == 'null' || resp_data['car_id'] == 'undefined')){
remFullScreenLoader(); remFullScreenLoader();
var msg = (resp_data['status'] == '2')?'No Data Found, Try again with proper search parameters':'Something went wrong, please try again later...!'; var msg = 'Something went wrong, please try again later...!';
if(resp_data['status'] == '2')
msg = 'No Data Found, Try again with proper search parameters..!';
if(resp_data['status'] == '3')
msg = 'Provide a valid Location..!';
jQuery('[id="modal_content"]').html(msg); jQuery('[id="modal_content"]').html(msg);
return false; return false;
} }
var vehHtmlBody = '', vehicleData = resp_data['veh_data']; var vehHtmlBody = '', car_id = resp_data['car_id'], vehicleData = resp_data['veh_data'];
vehHtmlBody = '<span class="vechile-body disp-block">' vehHtmlBody = '<span class="vechile-body disp-block marginBottom-10">'
+vehicleData['vehicle']+ +vehicleData['vehicle']+
'<div id="closeVehSearch" class="float-right">'+ '<div onclick="searchAction('+car_id+',3,0,\''+vehicleData['vehicle']+'\');" class="float-right">'+
'<i class="fa fa-fw fa-close cpoint"></i>'+ '<i class="fa fa-fw fa-close cpoint"></i>'+
'</div>'+ '</div>'+
'</span>'; '</span>';
...@@ -465,10 +494,15 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) { ...@@ -465,10 +494,15 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) {
'<div class="col-xs-6"><span class="info-box-text">'+value+'</span></div>'+ '<div class="col-xs-6"><span class="info-box-text">'+value+'</span></div>'+
'</div>'; '</div>';
}); });
vehHtmlBody += '<div class="col-md-12">'+
'<button onclick="searchAction('+car_id+',3,0,\''+vehicleData['vehicle']+'\');" type="button" class="btn btn-danger float-right margin-all">Remove</button>'+
'<button onclick="searchAction('+car_id+',2,0,\''+vehicleData['vehicle']+'\');" type="button" class="btn btn-primary float-right margin-all">Add</button>'+
'</div>';
jQuery('[id="CarSearchResult"]').append('<div class="box-body border marginTop10">'+vehHtmlBody+'</div>'); jQuery('[id="carSearchResult"]').html('<div id="search_result_'+car_id+'" class="box-body border marginTop10">'+vehHtmlBody+'</div>');
jQuery('[id="CarSearchResult"]').removeClass('hide'); jQuery('[id="carSearchResult"]').removeClass('hide');
remFullScreenLoader(); remFullScreenLoader();
slideTo('carSearchResult');
}, },
fail: function(xhr, textStatus, errorThrown){ fail: function(xhr, textStatus, errorThrown){
remFullScreenLoader(); remFullScreenLoader();
...@@ -481,13 +515,32 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) { ...@@ -481,13 +515,32 @@ jQuery('[name="vechile_search_form"]').on('submit',function(event) {
}); });
}); });
jQuery("div").on("click","div#closeVehSearch", function(){ function searchAction(car_id, action, saved, name){
jQuery('[name="vechile_search_form"]').trigger("reset"); if(car_id == '' || car_id == null || car_id == 'null' || car_id == undefined || car_id == 'undefined' || action == '' || action == null || action == 'null' || action == undefined || action == 'undefined'){
jQuery('[id="CarSearchResult"]').html(''); return false;
jQuery('[id="CarSearchResult"]').addClass('hide'); }
}); var html = '';
if(action == 0 || action == 1 || action == 3){
if(saved == 1){
jQuery('[id="addCars"]').on('click',function() { jQuery('[id="saved_vehicle_'+car_id+'"]').remove();
modalTrigger('Add New Cars',jQuery('[id="vechileAddHtml"]').html()); }
}); slideTo('CarSearchForm');
jQuery.ajax({
url : base_url+"Vehicle/updateUserCarStatus",
type : 'POST',
data : {'car_id':car_id,'action':action}
});
}
if(action == 2){
html = '<span id="saved_vehicle_'+car_id+'" class="vechile-body disp-block marginBottom-5">'
+name+
'<div onclick="searchAction('+car_id+',3,1,\'\');" class="float-right">'+
'<i class="fa fa-fw fa-close cpoint"></i>'+
'</div>'+
'<input type="hidden" name="saved_vehicles[]" >'+
'</span>';
jQuery('[id="savedVehiclesCntr"]').append(html);
slideTo('savedVehiclesCntr');
}
jQuery('[id="search_result_'+car_id+'"]').remove();
}
-- phpMyAdmin SQL Dump -- phpMyAdmin SQL Dump
-- version 4.8.3 -- version 4.7.9
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Host: db -- Host: 127.0.0.1:3306
-- Generation Time: Dec 15, 2018 at 12:21 PM -- Generation Time: Dec 16, 2018 at 04:01 PM
-- Server version: 5.6.41 -- Server version: 5.7.21
-- PHP Version: 7.2.8 -- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0; SET AUTOCOMMIT = 0;
...@@ -28,15 +28,17 @@ SET time_zone = "+00:00"; ...@@ -28,15 +28,17 @@ SET time_zone = "+00:00";
-- Table structure for table `admin_users` -- Table structure for table `admin_users`
-- --
CREATE TABLE `admin_users` ( DROP TABLE IF EXISTS `admin_users`;
`id` int(11) NOT NULL, CREATE TABLE IF NOT EXISTS `admin_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL, `username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL, `password` varchar(100) NOT NULL,
`user_type` tinyint(3) NOT NULL COMMENT '1 => Super Admin, 2 => Mechanic', `user_type` tinyint(3) NOT NULL COMMENT '1 => Super Admin, 2 => Mechanic',
`display_name` varchar(200) NOT NULL, `display_name` varchar(200) NOT NULL,
`profile_image` varchar(500) NOT NULL, `profile_image` varchar(500) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1' `status` tinyint(4) NOT NULL DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `admin_users` -- Dumping data for table `admin_users`
...@@ -54,8 +56,9 @@ INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_n ...@@ -54,8 +56,9 @@ INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_n
-- Table structure for table `customers` -- Table structure for table `customers`
-- --
CREATE TABLE `customers` ( DROP TABLE IF EXISTS `customers`;
`customer_id` int(20) NOT NULL, CREATE TABLE IF NOT EXISTS `customers` (
`customer_id` int(20) NOT NULL AUTO_INCREMENT,
`first_name` varchar(50) NOT NULL, `first_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL,
`phone` varchar(20) DEFAULT NULL, `phone` varchar(20) DEFAULT NULL,
...@@ -64,8 +67,9 @@ CREATE TABLE `customers` ( ...@@ -64,8 +67,9 @@ CREATE TABLE `customers` (
`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,
`status` tinyint(3) NOT NULL DEFAULT '1' `status` tinyint(3) NOT NULL DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `customers` -- Dumping data for table `customers`
...@@ -77,14 +81,57 @@ INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `ema ...@@ -77,14 +81,57 @@ INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `ema
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
-- Table structure for table `customer_vehicle`
--
DROP TABLE IF EXISTS `customer_vehicle`;
CREATE TABLE IF NOT EXISTS `customer_vehicle` (
`customer_veh_id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) DEFAULT NULL,
`car_name` varchar(250) DEFAULT NULL,
`car_model` varchar(150) DEFAULT NULL,
`car_maker` varchar(150) DEFAULT NULL,
`car_model_year` varchar(150) DEFAULT NULL,
`car_vin` varchar(150) DEFAULT NULL,
`vehicle_data` longtext,
`car_location` varchar(250) DEFAULT NULL,
`car_loc_lat` varchar(150) DEFAULT NULL,
`car_loc_lng` varchar(150) DEFAULT NULL,
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` tinyint(3) NOT NULL DEFAULT '3',
PRIMARY KEY (`customer_veh_id`)
) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
--
-- Dumping data for 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
(11, NULL, '2008 Hyundai Sonata GLS', 'sonata', 'hyundai', '2008', NULL, '{\"vehicle\":\"2008 Hyundai Sonata GLS\",\"attributes\":{\"Year\":\"2008\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"GLS\",\"Short Trim\":\"GLS\",\"Trim Variations\":\"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\":\"17.7 gallon\",\"City Mileage\":\"21 miles\\/gallon\",\"Highway Mileage\":\"30 - 31 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3266\",\"Gross Weight\":\"\",\"Overall Height\":\"58.00 inches\",\"Overall Length\":\"188.90 inches\",\"Overall Width\":\"72.10 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$18,083\",\"Delivery Charges\":\"$675\",\"MSRP\":\"$18,870\"},\"success\":true,\"error\":\"\"}', 'DFW International Airport (DFW), Aviation Drive, DFW Airport, TX, USA', '32.8555236', '-97.03887', '2018-12-16 13:56:12', 3),
(14, NULL, '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\":\"\"}', 'Dilworth-glyndon-felton, MN, USA', '46.9858777', '-96.5887048', '2018-12-16 15:23:51', 3),
(15, NULL, '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\":\"\"}', 'Ghirardelli Square, North Point Street, San Francisco, CA, USA', '37.8058763', '-122.4229502', '2018-12-16 15:27:09', 3),
(16, NULL, '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\":\"\"}', 'FDR Drive, Brooklyn, NY, USA', '40.7100593', '-73.9894836', '2018-12-16 15:29:43', 3),
(17, NULL, '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\":\"\"}', 'FGCU Boulevard South, Fort Myers, FL, USA', '26.4604871', '-81.7715028', '2018-12-16 15:37:55', 3),
(18, NULL, '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\":\"\"}', '6679A Broadway, Bronx, NY, USA', '40.9107395', '-73.8968306', '2018-12-16 15:40:57', 3),
(19, 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\":\"\"}', 'SDF airport (SDF), Terminal Drive, Louisville, KY, USA', '38.175662', '-85.7369231', '2018-12-16 15:42:04', 3),
(20, NULL, '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\":\"\"}', '2615 Massachusetts Avenue, Cambridge, MA, USA', '42.4010983', '-71.1352662', '2018-12-16 15:47:53', 3),
(21, NULL, '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\":\"\"}', '2547 Massachusetts Avenue, Cambridge, MA, USA', '42.4002336', '-71.1338137', '2018-12-16 15:49:20', 3),
(23, NULL, '2013 Hyundai Sonata GLS', 'sonata', 'hyundai', '2013', NULL, '{\"vehicle\":\"2013 Hyundai Sonata GLS\",\"attributes\":{\"Year\":\"2013\",\"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\":\"Car\",\"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\":\"3199\",\"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,293\",\"Delivery Charges\":\"$795\",\"MSRP\":\"$21,195\"},\"success\":true,\"error\":\"\"}', 'Dallas, TX, USA', '32.7766642', '-96.7969879', '2018-12-16 15:54:49', 3),
(24, NULL, '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\":\"\"}', 'R G Skinner Parkway, Jacksonville, FL, USA', '30.2099654', '-81.5130142', '2018-12-16 15:57:38', 3);
-- --------------------------------------------------------
--
-- Table structure for table `issues` -- Table structure for table `issues`
-- --
CREATE TABLE `issues` ( DROP TABLE IF EXISTS `issues`;
`issue_id` int(11) NOT NULL, CREATE TABLE IF NOT EXISTS `issues` (
`issue_id` int(11) NOT NULL AUTO_INCREMENT,
`issue` varchar(500) NOT NULL, `issue` varchar(500) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1' `status` tinyint(3) NOT NULL DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`issue_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `issues` -- Dumping data for table `issues`
...@@ -105,8 +152,9 @@ INSERT INTO `issues` (`issue_id`, `issue`, `status`) VALUES ...@@ -105,8 +152,9 @@ INSERT INTO `issues` (`issue_id`, `issue`, `status`) VALUES
-- Table structure for table `mechanic` -- Table structure for table `mechanic`
-- --
CREATE TABLE `mechanic` ( DROP TABLE IF EXISTS `mechanic`;
`id` int(11) NOT NULL, CREATE TABLE IF NOT EXISTS `mechanic` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mechanic_id` int(11) NOT NULL, `mechanic_id` int(11) NOT NULL,
`shop_id` int(11) NOT NULL DEFAULT '0', `shop_id` int(11) NOT NULL DEFAULT '0',
`first_name` varchar(50) NOT NULL, `first_name` varchar(50) NOT NULL,
...@@ -120,8 +168,9 @@ CREATE TABLE `mechanic` ( ...@@ -120,8 +168,9 @@ CREATE TABLE `mechanic` (
`licence_number` varchar(250) DEFAULT NULL, `licence_number` varchar(250) DEFAULT NULL,
`licence_exp_date` varchar(250) DEFAULT NULL, `licence_exp_date` varchar(250) DEFAULT NULL,
`location_lat` varchar(30) DEFAULT NULL, `location_lat` varchar(30) DEFAULT NULL,
`location_lng` varchar(30) DEFAULT NULL `location_lng` varchar(30) DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `mechanic` -- Dumping data for table `mechanic`
...@@ -138,14 +187,16 @@ INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name ...@@ -138,14 +187,16 @@ INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name
-- Table structure for table `mechanic_issues` -- Table structure for table `mechanic_issues`
-- --
CREATE TABLE `mechanic_issues` ( DROP TABLE IF EXISTS `mechanic_issues`;
`id` int(11) NOT NULL, CREATE TABLE IF NOT EXISTS `mechanic_issues` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`issue_id` int(11) DEFAULT NULL, `issue_id` int(11) DEFAULT NULL,
`mechanic_id` int(11) DEFAULT NULL, `mechanic_id` int(11) DEFAULT NULL,
`issue_description` longtext, `issue_description` longtext,
`service_fee` double NOT NULL DEFAULT '0', `service_fee` double NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '1' `status` tinyint(3) NOT NULL DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `mechanic_issues` -- Dumping data for table `mechanic_issues`
...@@ -163,14 +214,16 @@ INSERT INTO `mechanic_issues` (`id`, `issue_id`, `mechanic_id`, `issue_descripti ...@@ -163,14 +214,16 @@ INSERT INTO `mechanic_issues` (`id`, `issue_id`, `mechanic_id`, `issue_descripti
-- Table structure for table `mechanic_shop` -- Table structure for table `mechanic_shop`
-- --
CREATE TABLE `mechanic_shop` ( DROP TABLE IF EXISTS `mechanic_shop`;
`shop_id` int(11) NOT NULL, CREATE TABLE IF NOT EXISTS `mechanic_shop` (
`shop_id` int(11) NOT NULL AUTO_INCREMENT,
`shop_name` varchar(250) NOT NULL, `shop_name` varchar(250) NOT NULL,
`address` varchar(500) NOT NULL, `address` varchar(500) NOT NULL,
`phone` varchar(15) NOT NULL, `phone` varchar(15) NOT NULL,
`email_id` varchar(150) NOT NULL, `email_id` varchar(150) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1' `status` tinyint(3) NOT NULL DEFAULT '1',
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`shop_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `mechanic_shop` -- Dumping data for table `mechanic_shop`
...@@ -186,8 +239,9 @@ INSERT INTO `mechanic_shop` (`shop_id`, `shop_name`, `address`, `phone`, `email_ ...@@ -186,8 +239,9 @@ INSERT INTO `mechanic_shop` (`shop_id`, `shop_name`, `address`, `phone`, `email_
-- Table structure for table `setting` -- Table structure for table `setting`
-- --
CREATE TABLE `setting` ( DROP TABLE IF EXISTS `setting`;
`id` int(11) NOT NULL, CREATE TABLE IF NOT EXISTS `setting` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(250) NOT NULL, `title` varchar(250) NOT NULL,
`title_short` varchar(250) NOT NULL, `title_short` varchar(250) NOT NULL,
`site_logo` varchar(150) NOT NULL, `site_logo` varchar(150) NOT NULL,
...@@ -199,8 +253,9 @@ CREATE TABLE `setting` ( ...@@ -199,8 +253,9 @@ CREATE TABLE `setting` (
`smtp_password` varchar(150) NOT NULL, `smtp_password` varchar(150) NOT NULL,
`google_api_key` varchar(500) DEFAULT NULL, `google_api_key` varchar(500) DEFAULT NULL,
`vin_audit_url` varchar(500) DEFAULT NULL, `vin_audit_url` varchar(500) DEFAULT NULL,
`vin_audit_api` varchar(500) DEFAULT NULL `vin_audit_api` varchar(500) DEFAULT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1; PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `setting` -- Dumping data for table `setting`
...@@ -208,98 +263,6 @@ CREATE TABLE `setting` ( ...@@ -208,98 +263,6 @@ 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, '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');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin_users`
--
ALTER TABLE `admin_users`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
ADD PRIMARY KEY (`customer_id`);
--
-- Indexes for table `issues`
--
ALTER TABLE `issues`
ADD PRIMARY KEY (`issue_id`);
--
-- Indexes for table `mechanic`
--
ALTER TABLE `mechanic`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mechanic_issues`
--
ALTER TABLE `mechanic_issues`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mechanic_shop`
--
ALTER TABLE `mechanic_shop`
ADD PRIMARY KEY (`shop_id`);
--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin_users`
--
ALTER TABLE `admin_users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
MODIFY `customer_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `issues`
--
ALTER TABLE `issues`
MODIFY `issue_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `mechanic`
--
ALTER TABLE `mechanic`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `mechanic_issues`
--
ALTER TABLE `mechanic_issues`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `mechanic_shop`
--
ALTER TABLE `mechanic_shop`
MODIFY `shop_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `setting`
--
ALTER TABLE `setting`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT; COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment