From 1516e533a61b041905ce7fc8e20c17d9feeda717 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 17 Jul 2019 10:27:38 +0000 Subject: [PATCH 01/13] Create environment for Postman for PoC for test scripts. Create test scripts to test the following API endpoints: register, confirm number, get status. #229 --- postman/PoC Resq.postman_environment.json | 19 ++ ...I - API Controller.postman_collection.json | 282 ++++++++++++++++++ 2 files changed, 301 insertions(+) create mode 100755 postman/PoC Resq.postman_environment.json create mode 100755 postman/Resq Mobile API - API Controller.postman_collection.json diff --git a/postman/PoC Resq.postman_environment.json b/postman/PoC Resq.postman_environment.json new file mode 100755 index 00000000..c1c10ff6 --- /dev/null +++ b/postman/PoC Resq.postman_environment.json @@ -0,0 +1,19 @@ +{ + "id": "24bbd673-6484-405c-be3c-9232e7167813", + "name": "PoC Resq", + "values": [ + { + "key": "resq_url", + "value": "resq.local", + "enabled": true + }, + { + "key": "api_key", + "value": "5d2eedb4b4714", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2019-07-17T10:22:33.397Z", + "_postman_exported_using": "Postman/7.2.2" +} \ No newline at end of file diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json new file mode 100755 index 00000000..a7f77ec6 --- /dev/null +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -0,0 +1,282 @@ +{ + "info": { + "_postman_id": "a7eece2c-4939-461c-8b01-6d2ec1020193", + "name": "Resq Mobile API - API Controller", + "description": "API call to register a mobile number", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "[Normal] Register", + "event": [ + { + "listen": "test", + "script": { + "id": "9170a06a-c4bd-4747-85c4-8f3d27b17984", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Register\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data).to.have.property(\"session_id\");", + " ", + " // get session id value", + " let session_id = jsonData.data.session_id;", + " ", + " // store the session_id value as an environment variable. The session id is the api_key in calls requiring an api_key", + " ", + " pm.environment.set(\"api_key\", session_id);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "phone_model", + "value": "{{phone_model}}", + "type": "text" + }, + { + "key": "os_type", + "value": "{{os_type}}", + "type": "text" + }, + { + "key": "os_version", + "value": "{{os_version}}", + "type": "text" + }, + { + "key": "phone_id", + "value": "{{phone_id}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/register", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "register" + ] + } + }, + "response": [] + }, + { + "name": "[Abnormal] Missing parameters", + "event": [ + { + "listen": "test", + "script": { + "id": "2cf0b49e-cc34-4437-ae6f-9a5da1c45afa", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Missing all parameters\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"error\");", + " pm.expect(jsonData.error.message).to.include(\"Missing parameter\");", + " pm.expect(jsonData.data).to.be.empty;", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{resq_url}}/api/register", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "register" + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Confirm Number", + "event": [ + { + "listen": "test", + "script": { + "id": "4a6c099e-3484-4047-83db-a29ab500f27a", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Confirm number\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "phone_number", + "value": "{{phone_number}}", + "type": "text" + }, + { + "key": "api_key", + "value": "{{api_key}}", + "type": "text", + "disabled": true + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/number_confirm?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "number_confirm" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get Status", + "event": [ + { + "listen": "test", + "script": { + "id": "dabc1451-e75d-46c6-b3fa-5992b62a065f", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Status of mobile session\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.status).to.eql(\"unconfirmed\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/status?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "status" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "2d197aae-8a0c-410b-b188-4f788959d2c2", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "050072f2-bd10-4001-a44f-3e486904a34e", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "id": "a1cfb454-de0c-4c74-9a45-c14dc9bf2da0", + "key": "resq_url", + "value": "resq.local", + "type": "string" + }, + { + "id": "cf0248b6-ea72-44ca-8de6-ba6a20f9ee9d", + "key": "phone_model", + "value": "iPhone8", + "type": "string" + }, + { + "id": "069c06e7-6a38-4998-aa62-e3789c615253", + "key": "os_type", + "value": "IOS", + "type": "string" + }, + { + "id": "c7c3e8e7-3f49-46c0-932d-25cc281c4d23", + "key": "os_version", + "value": "11.4", + "type": "string" + }, + { + "id": "8bda1ea8-63bf-400a-a0d7-832e13a273f7", + "key": "phone_id", + "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", + "type": "string" + }, + { + "id": "236e99e8-1bb8-412f-9827-3dd955b40172", + "key": "phone_number", + "value": "9221111111", + "type": "string" + } + ] +} \ No newline at end of file -- 2.43.5 From f92db23b0cb09d40e957873ea440374350de1e57 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 17 Jul 2019 10:29:50 +0000 Subject: [PATCH 02/13] Add db dump for test database. #229 --- postman/resq_test_clean_20190717.sql | 1400 ++++++++++++++++++++++++++ 1 file changed, 1400 insertions(+) create mode 100644 postman/resq_test_clean_20190717.sql diff --git a/postman/resq_test_clean_20190717.sql b/postman/resq_test_clean_20190717.sql new file mode 100644 index 00000000..0e57cc61 --- /dev/null +++ b/postman/resq_test_clean_20190717.sql @@ -0,0 +1,1400 @@ +-- MySQL dump 10.16 Distrib 10.2.22-MariaDB, for Linux (x86_64) +-- +-- Host: localhost Database: resq_test +-- ------------------------------------------------------ +-- Server version 10.2.22-MariaDB + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `api_role` +-- + +DROP TABLE IF EXISTS `api_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `api_role` ( + `id` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `acl_attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '(DC2Type:json_array)', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `api_role` +-- + +LOCK TABLES `api_role` WRITE; +/*!40000 ALTER TABLE `api_role` DISABLE KEYS */; +INSERT INTO `api_role` VALUES ('ROLE_SUPER_ADMIN','Super Administrator','{\"warranty.list\":true,\"warranty.find.serial\":true,\"warranty.find.platenumber\":true, \"warranty.register.battery\":true, \"warranty.claim\":true,\"batterybrand.list\":true,\"batterysize.list\":true,\"battery.list\":true, \"vmanufacturer.list\":true, \"vehicle.list\":true}'); +/*!40000 ALTER TABLE `api_role` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `api_user` +-- + +DROP TABLE IF EXISTS `api_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `api_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `api_key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, + `secret_key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `date_create` datetime NOT NULL, + `enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `api_user` +-- + +LOCK TABLES `api_user` WRITE; +/*!40000 ALTER TABLE `api_user` DISABLE KEYS */; +/*!40000 ALTER TABLE `api_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `api_user_role` +-- + +DROP TABLE IF EXISTS `api_user_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `api_user_role` ( + `user_id` int(11) NOT NULL, + `role_id` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`user_id`,`role_id`), + KEY `IDX_503C63D8A76ED395` (`user_id`), + KEY `IDX_503C63D8D60322AC` (`role_id`), + CONSTRAINT `FK_503C63D8A76ED395` FOREIGN KEY (`user_id`) REFERENCES `api_user` (`id`) ON DELETE CASCADE, + CONSTRAINT `FK_503C63D8D60322AC` FOREIGN KEY (`role_id`) REFERENCES `api_role` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `api_user_role` +-- + +LOCK TABLES `api_user_role` WRITE; +/*!40000 ALTER TABLE `api_user_role` DISABLE KEYS */; +/*!40000 ALTER TABLE `api_user_role` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `battery` +-- + +DROP TABLE IF EXISTS `battery`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `battery` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `manufacturer_id` int(11) DEFAULT NULL, + `model_id` int(11) DEFAULT NULL, + `size_id` int(11) DEFAULT NULL, + `prod_code` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `sap_code` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `warr_private` smallint(6) NOT NULL, + `warr_commercial` smallint(6) NOT NULL, + `warr_tnv` smallint(6) NOT NULL, + `res_capacity` smallint(6) NOT NULL, + `length` smallint(6) NOT NULL, + `width` smallint(6) NOT NULL, + `height` smallint(6) NOT NULL, + `total_height` smallint(6) NOT NULL, + `sell_price` decimal(7,2) DEFAULT NULL, + `image_file` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_D02EF4AEA23B42D` (`manufacturer_id`), + KEY `IDX_D02EF4AE7975B7E7` (`model_id`), + KEY `IDX_D02EF4AE498DA827` (`size_id`), + CONSTRAINT `FK_D02EF4AE498DA827` FOREIGN KEY (`size_id`) REFERENCES `battery_size` (`id`), + CONSTRAINT `FK_D02EF4AE7975B7E7` FOREIGN KEY (`model_id`) REFERENCES `battery_model` (`id`), + CONSTRAINT `FK_D02EF4AEA23B42D` FOREIGN KEY (`manufacturer_id`) REFERENCES `battery_manufacturer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `battery` +-- + +LOCK TABLES `battery` WRITE; +/*!40000 ALTER TABLE `battery` DISABLE KEYS */; +/*!40000 ALTER TABLE `battery` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `battery_manufacturer` +-- + +DROP TABLE IF EXISTS `battery_manufacturer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `battery_manufacturer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `battery_manufacturer` +-- + +LOCK TABLES `battery_manufacturer` WRITE; +/*!40000 ALTER TABLE `battery_manufacturer` DISABLE KEYS */; +/*!40000 ALTER TABLE `battery_manufacturer` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `battery_model` +-- + +DROP TABLE IF EXISTS `battery_model`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `battery_model` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `battery_model` +-- + +LOCK TABLES `battery_model` WRITE; +/*!40000 ALTER TABLE `battery_model` DISABLE KEYS */; +/*!40000 ALTER TABLE `battery_model` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `battery_size` +-- + +DROP TABLE IF EXISTS `battery_size`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `battery_size` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `tip_motolite` decimal(7,2) NOT NULL, + `tip_premium` decimal(7,2) NOT NULL, + `tip_other` decimal(7,2) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `battery_size` +-- + +LOCK TABLES `battery_size` WRITE; +/*!40000 ALTER TABLE `battery_size` DISABLE KEYS */; +/*!40000 ALTER TABLE `battery_size` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `battery_vehicle` +-- + +DROP TABLE IF EXISTS `battery_vehicle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `battery_vehicle` ( + `battery_id` int(11) NOT NULL, + `vehicle_id` int(11) NOT NULL, + PRIMARY KEY (`battery_id`,`vehicle_id`), + KEY `IDX_F46DF59019A19CFC` (`battery_id`), + KEY `IDX_F46DF590545317D1` (`vehicle_id`), + CONSTRAINT `FK_F46DF59019A19CFC` FOREIGN KEY (`battery_id`) REFERENCES `battery` (`id`) ON DELETE CASCADE, + CONSTRAINT `FK_F46DF590545317D1` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicle` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `battery_vehicle` +-- + +LOCK TABLES `battery_vehicle` WRITE; +/*!40000 ALTER TABLE `battery_vehicle` DISABLE KEYS */; +/*!40000 ALTER TABLE `battery_vehicle` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `customer` +-- + +DROP TABLE IF EXISTS `customer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `first_name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `last_name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `customer_classification` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `customer_notes` text COLLATE utf8mb4_unicode_ci NOT NULL, + `phone_mobile` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `phone_landline` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `phone_office` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `phone_fax` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `flag_confirmed` tinyint(1) NOT NULL, + `flag_mobile_app` tinyint(1) NOT NULL, + `flag_active` tinyint(1) NOT NULL, + `flag_csat` tinyint(1) NOT NULL, + `email` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `priv_third_party` tinyint(1) NOT NULL, + `priv_promo` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `customer` +-- + +LOCK TABLES `customer` WRITE; +/*!40000 ALTER TABLE `customer` DISABLE KEYS */; +/*!40000 ALTER TABLE `customer` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `customer_vehicle` +-- + +DROP TABLE IF EXISTS `customer_vehicle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customer_vehicle` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `customer_id` int(11) DEFAULT NULL, + `vehicle_id` int(11) DEFAULT NULL, + `battery_id` int(11) DEFAULT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `plate_number` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, + `model_year` smallint(6) NOT NULL, + `color` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `status_condition` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `fuel_type` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `warranty_code` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `warranty_expiration` date DEFAULT NULL, + `flag_motolite_battery` tinyint(1) NOT NULL, + `flag_active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_75D40389395C3F3` (`customer_id`), + KEY `IDX_75D4038545317D1` (`vehicle_id`), + KEY `IDX_75D403819A19CFC` (`battery_id`), + FULLTEXT KEY `IDX_75D4038FCFF3785` (`plate_number`), + CONSTRAINT `FK_75D403819A19CFC` FOREIGN KEY (`battery_id`) REFERENCES `battery` (`id`), + CONSTRAINT `FK_75D4038545317D1` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicle` (`id`), + CONSTRAINT `FK_75D40389395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `customer_vehicle` +-- + +LOCK TABLES `customer_vehicle` WRITE; +/*!40000 ALTER TABLE `customer_vehicle` DISABLE KEYS */; +/*!40000 ALTER TABLE `customer_vehicle` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hub` +-- + +DROP TABLE IF EXISTS `hub`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hub` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `branch` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `address` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `coordinates` point NOT NULL COMMENT '(DC2Type:point)', + `contact_nums` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `time_open` time NOT NULL, + `time_close` time NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hub` +-- + +LOCK TABLES `hub` WRITE; +/*!40000 ALTER TABLE `hub` DISABLE KEYS */; +/*!40000 ALTER TABLE `hub` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `invoice` +-- + +DROP TABLE IF EXISTS `invoice`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `invoice` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `job_order_id` int(11) DEFAULT NULL, + `promo_id` int(11) DEFAULT NULL, + `date_create` datetime NOT NULL, + `date_paid` datetime DEFAULT NULL, + `date_cancel` datetime DEFAULT NULL, + `discount` decimal(9,2) NOT NULL, + `trade_in` decimal(9,2) NOT NULL, + `vat` decimal(9,2) NOT NULL, + `vat_exclusive_price` decimal(9,2) NOT NULL, + `total_price` decimal(9,2) NOT NULL, + `status` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_90651744EAD8C843` (`job_order_id`), + KEY `IDX_90651744A76ED395` (`user_id`), + KEY `IDX_90651744D0C07AFF` (`promo_id`), + CONSTRAINT `FK_90651744A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_90651744D0C07AFF` FOREIGN KEY (`promo_id`) REFERENCES `promo` (`id`), + CONSTRAINT `FK_90651744EAD8C843` FOREIGN KEY (`job_order_id`) REFERENCES `job_order` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `invoice` +-- + +LOCK TABLES `invoice` WRITE; +/*!40000 ALTER TABLE `invoice` DISABLE KEYS */; +/*!40000 ALTER TABLE `invoice` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `invoice_item` +-- + +DROP TABLE IF EXISTS `invoice_item`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `invoice_item` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `invoice_id` int(11) DEFAULT NULL, + `battery_id` int(11) DEFAULT NULL, + `title` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `qty` smallint(6) NOT NULL, + `price` decimal(9,2) NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_1DDE477B2989F1FD` (`invoice_id`), + KEY `IDX_1DDE477B19A19CFC` (`battery_id`), + CONSTRAINT `FK_1DDE477B19A19CFC` FOREIGN KEY (`battery_id`) REFERENCES `battery` (`id`), + CONSTRAINT `FK_1DDE477B2989F1FD` FOREIGN KEY (`invoice_id`) REFERENCES `invoice` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `invoice_item` +-- + +LOCK TABLES `invoice_item` WRITE; +/*!40000 ALTER TABLE `invoice_item` DISABLE KEYS */; +/*!40000 ALTER TABLE `invoice_item` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `jo_event` +-- + +DROP TABLE IF EXISTS `jo_event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `jo_event` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `create_user_id` int(11) DEFAULT NULL, + `job_order_id` int(11) DEFAULT NULL, + `rider_id` int(11) DEFAULT NULL, + `date_create` datetime NOT NULL, + `date_happen` datetime NOT NULL, + `type_id` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_59A3188E85564492` (`create_user_id`), + KEY `IDX_59A3188EEAD8C843` (`job_order_id`), + KEY `IDX_59A3188EFF881F6` (`rider_id`), + CONSTRAINT `FK_59A3188E85564492` FOREIGN KEY (`create_user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_59A3188EEAD8C843` FOREIGN KEY (`job_order_id`) REFERENCES `job_order` (`id`), + CONSTRAINT `FK_59A3188EFF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `jo_event` +-- + +LOCK TABLES `jo_event` WRITE; +/*!40000 ALTER TABLE `jo_event` DISABLE KEYS */; +/*!40000 ALTER TABLE `jo_event` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `jo_rejection` +-- + +DROP TABLE IF EXISTS `jo_rejection`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `jo_rejection` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `hub_id` int(11) DEFAULT NULL, + `jo_id` int(11) DEFAULT NULL, + `date_create` datetime NOT NULL, + `reason` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, + `remarks` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `contact_person` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_3684C43DA76ED395` (`user_id`), + KEY `IDX_3684C43D6C786081` (`hub_id`), + KEY `IDX_3684C43DEFE56386` (`jo_id`), + CONSTRAINT `FK_3684C43D6C786081` FOREIGN KEY (`hub_id`) REFERENCES `hub` (`id`), + CONSTRAINT `FK_3684C43DA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_3684C43DEFE56386` FOREIGN KEY (`jo_id`) REFERENCES `job_order` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `jo_rejection` +-- + +LOCK TABLES `jo_rejection` WRITE; +/*!40000 ALTER TABLE `jo_rejection` DISABLE KEYS */; +/*!40000 ALTER TABLE `jo_rejection` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `job_order` +-- + +DROP TABLE IF EXISTS `job_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `job_order` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `create_user_id` int(11) DEFAULT NULL, + `assign_user_id` int(11) DEFAULT NULL, + `process_user_id` int(11) DEFAULT NULL, + `customer_id` int(11) DEFAULT NULL, + `cvehicle_id` int(11) DEFAULT NULL, + `hub_id` int(11) DEFAULT NULL, + `rider_id` int(11) DEFAULT NULL, + `ref_jo_id` int(11) DEFAULT NULL, + `facilitated_hub_id` int(11) DEFAULT NULL, + `date_create` datetime NOT NULL, + `date_schedule` datetime NOT NULL, + `date_fulfill` datetime DEFAULT NULL, + `date_cancel` datetime DEFAULT NULL, + `date_assign` datetime DEFAULT NULL, + `coordinates` point NOT NULL COMMENT '(DC2Type:point)', + `coord_long` decimal(11,8) NOT NULL, + `coord_lat` decimal(11,8) NOT NULL, + `flag_advance` tinyint(1) NOT NULL, + `service_type` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `warranty_class` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `source` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `status` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `delivery_instructions` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `tier1_notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `tier2_notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `delivery_address` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `landmark` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `cancel_reason` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `mode_of_payment` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + `or_num` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `or_name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `promo_detail` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `trade_in_type` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `flag_rider_rating` tinyint(1) DEFAULT NULL, + `flag_coolant` tinyint(1) NOT NULL, + `facilitated_type` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_F4752EE89C2E0644` (`ref_jo_id`), + KEY `IDX_F4752EE885564492` (`create_user_id`), + KEY `IDX_F4752EE8AE8454D5` (`assign_user_id`), + KEY `IDX_F4752EE8EF160940` (`process_user_id`), + KEY `IDX_F4752EE89395C3F3` (`customer_id`), + KEY `IDX_F4752EE815683E72` (`cvehicle_id`), + KEY `IDX_F4752EE86C786081` (`hub_id`), + KEY `IDX_F4752EE8FF881F6` (`rider_id`), + KEY `IDX_F4752EE872A266D9` (`facilitated_hub_id`), + CONSTRAINT `FK_F4752EE815683E72` FOREIGN KEY (`cvehicle_id`) REFERENCES `customer_vehicle` (`id`), + CONSTRAINT `FK_F4752EE86C786081` FOREIGN KEY (`hub_id`) REFERENCES `hub` (`id`), + CONSTRAINT `FK_F4752EE872A266D9` FOREIGN KEY (`facilitated_hub_id`) REFERENCES `hub` (`id`), + CONSTRAINT `FK_F4752EE885564492` FOREIGN KEY (`create_user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_F4752EE89395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`), + CONSTRAINT `FK_F4752EE89C2E0644` FOREIGN KEY (`ref_jo_id`) REFERENCES `job_order` (`id`), + CONSTRAINT `FK_F4752EE8AE8454D5` FOREIGN KEY (`assign_user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_F4752EE8EF160940` FOREIGN KEY (`process_user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_F4752EE8FF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `job_order` +-- + +LOCK TABLES `job_order` WRITE; +/*!40000 ALTER TABLE `job_order` DISABLE KEYS */; +/*!40000 ALTER TABLE `job_order` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `legacy_job_order` +-- + +DROP TABLE IF EXISTS `legacy_job_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `legacy_job_order` ( + `id` int(11) NOT NULL, + `trans_date` date NOT NULL, + `trans_type` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `origin` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `car_brand` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + `car_make` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + `car_model` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + `car_color` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_name` varchar(90) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_first_name` varchar(35) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_middle_name` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_last_name` varchar(35) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_contact` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_mobile` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `cust_landline` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `delivery_instructions` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL, + `agent_notes_1` varchar(4000) COLLATE utf8mb4_unicode_ci NOT NULL, + `delivery_date` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `delivery_time` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `advance_order` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL, + `stage` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `cancel_reason` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL, + `cancel_reason_specify` varchar(2000) COLLATE utf8mb4_unicode_ci NOT NULL, + `payment_method` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `prepared_by` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `dispatch_time` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `dispatch_date` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `dispatched_by` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `address` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, + `landmark` varchar(320) COLLATE utf8mb4_unicode_ci NOT NULL, + `date_purchase` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `plate_number` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `legacy_job_order` +-- + +LOCK TABLES `legacy_job_order` WRITE; +/*!40000 ALTER TABLE `legacy_job_order` DISABLE KEYS */; +/*!40000 ALTER TABLE `legacy_job_order` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `legacy_job_order_row` +-- + +DROP TABLE IF EXISTS `legacy_job_order_row`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `legacy_job_order_row` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `job_order_id` int(11) DEFAULT NULL, + `item` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL, + `qty` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `price` decimal(9,2) NOT NULL, + `price_level` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `status` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `account` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + `enrollee` varchar(70) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_4AD08471EAD8C843` (`job_order_id`), + CONSTRAINT `FK_4AD08471EAD8C843` FOREIGN KEY (`job_order_id`) REFERENCES `legacy_job_order` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `legacy_job_order_row` +-- + +LOCK TABLES `legacy_job_order_row` WRITE; +/*!40000 ALTER TABLE `legacy_job_order_row` DISABLE KEYS */; +/*!40000 ALTER TABLE `legacy_job_order_row` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mobile_number` +-- + +DROP TABLE IF EXISTS `mobile_number`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mobile_number` ( + `id` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL, + `customer_id` int(11) DEFAULT NULL, + `confirm_code` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `date_registered` datetime DEFAULT NULL, + `flag_confirmed` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_E9B4F45EEB49070C` (`confirm_code`), + KEY `IDX_E9B4F45E9395C3F3` (`customer_id`), + CONSTRAINT `FK_E9B4F45E9395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mobile_number` +-- + +LOCK TABLES `mobile_number` WRITE; +/*!40000 ALTER TABLE `mobile_number` DISABLE KEYS */; +/*!40000 ALTER TABLE `mobile_number` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mobile_session` +-- + +DROP TABLE IF EXISTS `mobile_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mobile_session` ( + `id` varchar(13) COLLATE utf8mb4_unicode_ci NOT NULL, + `customer_id` int(11) DEFAULT NULL, + `phone_model` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + `os_type` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `os_version` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `device_push_id` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `phone_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `phone_number` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `confirm_code` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `confirm_flag` tinyint(1) NOT NULL, + `date_generated` datetime NOT NULL, + `date_confirmed` datetime DEFAULT NULL, + `date_code_sent` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_30EE18219395C3F3` (`customer_id`), + CONSTRAINT `FK_30EE18219395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mobile_session` +-- + +LOCK TABLES `mobile_session` WRITE; +/*!40000 ALTER TABLE `mobile_session` DISABLE KEYS */; +/*!40000 ALTER TABLE `mobile_session` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `outlet` +-- + +DROP TABLE IF EXISTS `outlet`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `outlet` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `hub_id` int(11) DEFAULT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `branch` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `address` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `coordinates` point NOT NULL COMMENT '(DC2Type:point)', + `contact_nums` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `time_open` time NOT NULL, + `time_close` time NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_93205CDB6C786081` (`hub_id`), + CONSTRAINT `FK_93205CDB6C786081` FOREIGN KEY (`hub_id`) REFERENCES `hub` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `outlet` +-- + +LOCK TABLES `outlet` WRITE; +/*!40000 ALTER TABLE `outlet` DISABLE KEYS */; +/*!40000 ALTER TABLE `outlet` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `partner` +-- + +DROP TABLE IF EXISTS `partner`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `partner` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `create_user_id` int(11) DEFAULT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `date_create` datetime NOT NULL, + `branch` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `address` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `coordinates` point NOT NULL COMMENT '(DC2Type:point)', + `contact_nums` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `time_open` time NOT NULL, + `time_close` time NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_312B3E1685564492` (`create_user_id`), + CONSTRAINT `FK_312B3E1685564492` FOREIGN KEY (`create_user_id`) REFERENCES `user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `partner` +-- + +LOCK TABLES `partner` WRITE; +/*!40000 ALTER TABLE `partner` DISABLE KEYS */; +/*!40000 ALTER TABLE `partner` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `partner_services` +-- + +DROP TABLE IF EXISTS `partner_services`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `partner_services` ( + `partner_id` int(11) NOT NULL, + `service_id` int(11) NOT NULL, + PRIMARY KEY (`partner_id`,`service_id`), + KEY `IDX_10F367D39393F8FE` (`partner_id`), + KEY `IDX_10F367D3ED5CA9E6` (`service_id`), + CONSTRAINT `FK_10F367D39393F8FE` FOREIGN KEY (`partner_id`) REFERENCES `partner` (`id`) ON DELETE CASCADE, + CONSTRAINT `FK_10F367D3ED5CA9E6` FOREIGN KEY (`service_id`) REFERENCES `service` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `partner_services` +-- + +LOCK TABLES `partner_services` WRITE; +/*!40000 ALTER TABLE `partner_services` DISABLE KEYS */; +/*!40000 ALTER TABLE `partner_services` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `plate_number` +-- + +DROP TABLE IF EXISTS `plate_number`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `plate_number` ( + `id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + `vehicle_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_FCFF3785545317D1` (`vehicle_id`), + CONSTRAINT `FK_FCFF3785545317D1` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicle` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `plate_number` +-- + +LOCK TABLES `plate_number` WRITE; +/*!40000 ALTER TABLE `plate_number` DISABLE KEYS */; +/*!40000 ALTER TABLE `plate_number` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `promo` +-- + +DROP TABLE IF EXISTS `promo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `promo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `code` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `discount_rate` decimal(11,10) NOT NULL, + `discount_apply` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_B0139AFB77153098` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `promo` +-- + +LOCK TABLES `promo` WRITE; +/*!40000 ALTER TABLE `promo` DISABLE KEYS */; +/*!40000 ALTER TABLE `promo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `review` +-- + +DROP TABLE IF EXISTS `review`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `review` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `partner_id` int(11) DEFAULT NULL, + `mobile_session_id` varchar(13) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `rating` int(11) NOT NULL, + `message` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `date_create` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_794381C69393F8FE` (`partner_id`), + KEY `IDX_794381C69A67BEF1` (`mobile_session_id`), + CONSTRAINT `FK_794381C69393F8FE` FOREIGN KEY (`partner_id`) REFERENCES `partner` (`id`), + CONSTRAINT `FK_794381C69A67BEF1` FOREIGN KEY (`mobile_session_id`) REFERENCES `mobile_session` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `review` +-- + +LOCK TABLES `review` WRITE; +/*!40000 ALTER TABLE `review` DISABLE KEYS */; +/*!40000 ALTER TABLE `review` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rider` +-- + +DROP TABLE IF EXISTS `rider`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rider` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `hub_id` int(11) DEFAULT NULL, + `first_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `last_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `contact_num` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `plate_number` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `image_file` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `curr_rating` int(11) NOT NULL, + `flag_available` tinyint(1) NOT NULL, + `flag_active` tinyint(1) NOT NULL, + `username` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `password` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_EA411035F85E0677` (`username`), + KEY `IDX_EA4110356C786081` (`hub_id`), + CONSTRAINT `FK_EA4110356C786081` FOREIGN KEY (`hub_id`) REFERENCES `hub` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rider` +-- + +LOCK TABLES `rider` WRITE; +/*!40000 ALTER TABLE `rider` DISABLE KEYS */; +/*!40000 ALTER TABLE `rider` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rider_rating` +-- + +DROP TABLE IF EXISTS `rider_rating`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rider_rating` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rider_id` int(11) DEFAULT NULL, + `customer_id` int(11) DEFAULT NULL, + `jo_id` int(11) DEFAULT NULL, + `date_create` datetime NOT NULL, + `rating` int(11) NOT NULL, + `comment` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_466996AEFE56386` (`jo_id`), + KEY `IDX_466996AFF881F6` (`rider_id`), + KEY `IDX_466996A9395C3F3` (`customer_id`), + CONSTRAINT `FK_466996A9395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`), + CONSTRAINT `FK_466996AEFE56386` FOREIGN KEY (`jo_id`) REFERENCES `job_order` (`id`), + CONSTRAINT `FK_466996AFF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rider_rating` +-- + +LOCK TABLES `rider_rating` WRITE; +/*!40000 ALTER TABLE `rider_rating` DISABLE KEYS */; +/*!40000 ALTER TABLE `rider_rating` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rider_schedule` +-- + +DROP TABLE IF EXISTS `rider_schedule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rider_schedule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rider_id` int(11) DEFAULT NULL, + `day_of_week` int(11) NOT NULL, + `time_start` time NOT NULL, + `time_end` time NOT NULL, + `break_start` time NOT NULL, + `break_end` time NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_3946A604FF881F6` (`rider_id`), + CONSTRAINT `FK_3946A604FF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rider_schedule` +-- + +LOCK TABLES `rider_schedule` WRITE; +/*!40000 ALTER TABLE `rider_schedule` DISABLE KEYS */; +/*!40000 ALTER TABLE `rider_schedule` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rider_session` +-- + +DROP TABLE IF EXISTS `rider_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rider_session` ( + `id` varchar(13) COLLATE utf8mb4_unicode_ci NOT NULL, + `rider_id` int(11) DEFAULT NULL, + `device_push_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + `phone_number` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_A89FF3C9FF881F6` (`rider_id`), + CONSTRAINT `FK_A89FF3C9FF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rider_session` +-- + +LOCK TABLES `rider_session` WRITE; +/*!40000 ALTER TABLE `rider_session` DISABLE KEYS */; +/*!40000 ALTER TABLE `rider_session` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `role` +-- + +DROP TABLE IF EXISTS `role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `role` ( + `id` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `acl_attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '(DC2Type:json_array)', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `role` +-- + +LOCK TABLES `role` WRITE; +/*!40000 ALTER TABLE `role` DISABLE KEYS */; +INSERT INTO `role` VALUES ('ROLE_ADMIN','Administrator','{\"dashboard.menu\":true,\"user.menu\":true,\"user.list\":true,\"user.add\":true,\"user.update\":true,\"user.delete\":true,\"user.profile\":true,\"role.menu\":true,\"role.list\":true,\"role.add\":true,\"role.update\":true,\"role.delete\":true,\"logistics.menu\":true,\"battery.menu\":true,\"battery.list\":true,\"battery.add\":true,\"battery.update\":true,\"battery.delete\":true,\"bmfg.menu\":true,\"bmfg.list\":true,\"bmfg.add\":true,\"bmfg.update\":true,\"bmfg.delete\":true,\"bmodel.menu\":true,\"bmodel.list\":true,\"bmodel.add\":true,\"bmodel.update\":true,\"bmodel.delete\":true,\"bsize.menu\":true,\"bsize.list\":true,\"bsize.add\":true,\"bsize.update\":true,\"bsize.delete\":true,\"vehicle.menu\":true,\"vehicle.list\":true,\"vehicle.add\":true,\"vehicle.update\":true,\"vehicle.delete\":true,\"vmfg.menu\":true,\"vmfg.list\":true,\"vmfg.add\":true,\"vmfg.update\":true,\"vmfg.delete\":true,\"customer.menu\":true,\"customer.list\":true,\"customer.add\":true,\"customer.update\":true,\"customer.delete\":true,\"location.menu\":true,\"hub.menu\":true,\"hub.list\":true,\"hub.add\":true,\"hub.update\":true,\"hub.delete\":true,\"rider.menu\":true,\"rider.list\":true,\"rider.add\":true,\"rider.update\":true,\"rider.delete\":true,\"joborder.menu\":true,\"jo_in.list\":true,\"jo_proc.list\":true,\"jo_proc.unlock\":true,\"jo_assign.list\":true,\"jo_assign.unlock\":true,\"jo_fulfill.list\":true,\"jo_open.list\":true,\"jo_all.list\":true,\"jo_pdf.list\":true,\"jo_open.edit\":true,\"joborder.cancel\":true,\"support.menu\":true,\"ticket.menu\":true,\"ticket.list\":true,\"ticket.add\":true,\"ticket.update\":true,\"ticket.delete\":true,\"promo.menu\":true,\"promo.list\":true,\"promo.add\":true,\"promo.update\":true,\"promo.delete\":true}'),('ROLE_AGENT_TIER_1','Agent Tier I','{\"user.profile\":true,\"customer.menu\":true,\"customer.list\":true,\"customer.add\":true,\"customer.update\":true,\"customer.delete\":true,\"location.menu\":true,\"hub.menu\":true,\"hub.list\":true,\"joborder.menu\":true,\"jo_in.list\":true,\"jo_fulfill.list\":true,\"jo_open.list\":true,\"jo_all.list\":true,\"jo_pdf.list\":true,\"jo_open.edit\":true,\"joborder.cancel\":true,\"support.menu\":true,\"ticket.menu\":true,\"ticket.list\":true,\"ticket.add\":true,\"ticket.update\":true,\"ticket.delete\":true}'),('ROLE_AGENT_TIER_2','Agent Tier II','{\"user.profile\":true,\"customer.menu\":true,\"customer.list\":true,\"customer.add\":true,\"customer.update\":true,\"customer.delete\":true,\"location.menu\":true,\"hub.menu\":true,\"hub.list\":true,\"joborder.menu\":true,\"jo_proc.list\":true,\"jo_assign.list\":true,\"jo_fulfill.list\":true,\"jo_open.list\":true,\"jo_all.list\":true,\"jo_pdf.list\":true,\"jo_open.edit\":true,\"joborder.cancel\":true,\"support.menu\":true,\"ticket.menu\":true,\"ticket.list\":true,\"ticket.add\":true,\"ticket.update\":true,\"ticket.delete\":true}'),('ROLE_COORDINATOR','Hub Coordinator','{\"user.profile\":true,\"logistics.menu\":true,\"customer.menu\":true,\"customer.list\":true,\"customer.add\":true,\"customer.update\":true,\"customer.delete\":true,\"location.menu\":true,\"outlet.list\":true,\"hub.menu\":true,\"hub.list\":true,\"rider.menu\":true,\"rider.list\":true,\"rider.add\":true,\"rider.update\":true,\"joborder.menu\":true,\"jo_in.list\":true,\"jo_proc.list\":true,\"jo_assign.list\":true,\"jo_fulfill.list\":true,\"jo_open.list\":true,\"jo_all.list\":true,\"jo_pdf.list\":true,\"jo_open.edit\":true,\"joborder.cancel\":true,\"support.menu\":true,\"ticket.menu\":true,\"ticket.list\":true,\"ticket.add\":true,\"ticket.update\":true,\"ticket.delete\":true}'),('ROLE_DISTRIBUTOR','Distributor','{\"support.menu\":true,\"warranty.search\":true}'),('ROLE_SUPER_ADMIN','Super Administrator','{\"dashboard.menu\":true,\"user.menu\":true,\"user.list\":true,\"user.add\":true,\"user.update\":true,\"user.delete\":true,\"role.menu\":true,\"role.list\":true,\"role.add\":true,\"role.update\":true,\"role.delete\":true}'); +/*!40000 ALTER TABLE `role` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sap_battery` +-- + +DROP TABLE IF EXISTS `sap_battery`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sap_battery` ( + `id` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `brand_id` int(11) DEFAULT NULL, + `size_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_385E33F44F5D008` (`brand_id`), + KEY `IDX_385E33F498DA827` (`size_id`), + CONSTRAINT `FK_385E33F44F5D008` FOREIGN KEY (`brand_id`) REFERENCES `sap_battery_brand` (`id`), + CONSTRAINT `FK_385E33F498DA827` FOREIGN KEY (`size_id`) REFERENCES `sap_battery_size` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sap_battery` +-- + +LOCK TABLES `sap_battery` WRITE; +/*!40000 ALTER TABLE `sap_battery` DISABLE KEYS */; +/*!40000 ALTER TABLE `sap_battery` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sap_battery_brand` +-- + +DROP TABLE IF EXISTS `sap_battery_brand`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sap_battery_brand` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sap_battery_brand` +-- + +LOCK TABLES `sap_battery_brand` WRITE; +/*!40000 ALTER TABLE `sap_battery_brand` DISABLE KEYS */; +/*!40000 ALTER TABLE `sap_battery_brand` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sap_battery_size` +-- + +DROP TABLE IF EXISTS `sap_battery_size`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sap_battery_size` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sap_battery_size` +-- + +LOCK TABLES `sap_battery_size` WRITE; +/*!40000 ALTER TABLE `sap_battery_size` DISABLE KEYS */; +/*!40000 ALTER TABLE `sap_battery_size` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `service` +-- + +DROP TABLE IF EXISTS `service`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `service` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `service` +-- + +LOCK TABLES `service` WRITE; +/*!40000 ALTER TABLE `service` DISABLE KEYS */; +/*!40000 ALTER TABLE `service` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `supported_area` +-- + +DROP TABLE IF EXISTS `supported_area`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `supported_area` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `date_create` datetime NOT NULL, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `coverage_area` polygon NOT NULL COMMENT '(DC2Type:polygon)', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `supported_area` +-- + +LOCK TABLES `supported_area` WRITE; +/*!40000 ALTER TABLE `supported_area` DISABLE KEYS */; +/*!40000 ALTER TABLE `supported_area` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ticket` +-- + +DROP TABLE IF EXISTS `ticket`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ticket` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `customer_id` int(11) DEFAULT NULL, + `job_order_id` int(11) DEFAULT NULL, + `date_create` datetime NOT NULL, + `status` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `ticket_type` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL, + `other_ticket_type` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `first_name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `last_name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `contact_num` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `details` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `plate_number` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_97A0ADA3A76ED395` (`user_id`), + KEY `IDX_97A0ADA39395C3F3` (`customer_id`), + KEY `IDX_97A0ADA3EAD8C843` (`job_order_id`), + CONSTRAINT `FK_97A0ADA39395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`), + CONSTRAINT `FK_97A0ADA3A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), + CONSTRAINT `FK_97A0ADA3EAD8C843` FOREIGN KEY (`job_order_id`) REFERENCES `job_order` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ticket` +-- + +LOCK TABLES `ticket` WRITE; +/*!40000 ALTER TABLE `ticket` DISABLE KEYS */; +/*!40000 ALTER TABLE `ticket` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `user` +-- + +DROP TABLE IF EXISTS `user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `password` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, + `enabled` tinyint(1) NOT NULL, + `first_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `last_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `contact_num` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_8D93D649F85E0677` (`username`), + UNIQUE KEY `UNIQ_8D93D649E7927C74` (`email`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `user` +-- + +LOCK TABLES `user` WRITE; +/*!40000 ALTER TABLE `user` DISABLE KEYS */; +INSERT INTO `user` VALUES (1,'admin','$2y$12$z6F6j4qz2UJrxTMGzX0ZjuSOx3TDrQ1bUlv1DM87sGBZvqTLilhyu',1,'Administrator','','',''); +/*!40000 ALTER TABLE `user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `user_hubs` +-- + +DROP TABLE IF EXISTS `user_hubs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_hubs` ( + `user_id` int(11) NOT NULL, + `hub_id` int(11) NOT NULL, + PRIMARY KEY (`user_id`,`hub_id`), + KEY `IDX_69AACF21A76ED395` (`user_id`), + KEY `IDX_69AACF216C786081` (`hub_id`), + CONSTRAINT `FK_69AACF216C786081` FOREIGN KEY (`hub_id`) REFERENCES `hub` (`id`) ON DELETE CASCADE, + CONSTRAINT `FK_69AACF21A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `user_hubs` +-- + +LOCK TABLES `user_hubs` WRITE; +/*!40000 ALTER TABLE `user_hubs` DISABLE KEYS */; +/*!40000 ALTER TABLE `user_hubs` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `user_role` +-- + +DROP TABLE IF EXISTS `user_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_role` ( + `user_id` int(11) NOT NULL, + `role_id` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`user_id`,`role_id`), + KEY `IDX_2DE8C6A3A76ED395` (`user_id`), + KEY `IDX_2DE8C6A3D60322AC` (`role_id`), + CONSTRAINT `FK_2DE8C6A3A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE, + CONSTRAINT `FK_2DE8C6A3D60322AC` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `user_role` +-- + +LOCK TABLES `user_role` WRITE; +/*!40000 ALTER TABLE `user_role` DISABLE KEYS */; +INSERT INTO `user_role` VALUES (1,'ROLE_SUPER_ADMIN'); +/*!40000 ALTER TABLE `user_role` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `vehicle` +-- + +DROP TABLE IF EXISTS `vehicle`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `vehicle` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `manufacturer_id` int(11) DEFAULT NULL, + `make` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `model_year_from` smallint(6) NOT NULL, + `model_year_to` smallint(6) NOT NULL, + `flag_mobile` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `IDX_1B80E486A23B42D` (`manufacturer_id`), + CONSTRAINT `FK_1B80E486A23B42D` FOREIGN KEY (`manufacturer_id`) REFERENCES `vehicle_manufacturer` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `vehicle` +-- + +LOCK TABLES `vehicle` WRITE; +/*!40000 ALTER TABLE `vehicle` DISABLE KEYS */; +/*!40000 ALTER TABLE `vehicle` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `vehicle_manufacturer` +-- + +DROP TABLE IF EXISTS `vehicle_manufacturer`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `vehicle_manufacturer` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `flag_mobile` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `vehicle_manufacturer` +-- + +LOCK TABLES `vehicle_manufacturer` WRITE; +/*!40000 ALTER TABLE `vehicle_manufacturer` DISABLE KEYS */; +/*!40000 ALTER TABLE `vehicle_manufacturer` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `warranty` +-- + +DROP TABLE IF EXISTS `warranty`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `warranty` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `bty_model_id` int(11) DEFAULT NULL, + `bty_size_id` int(11) DEFAULT NULL, + `sap_bty_id` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `claim_id` int(11) DEFAULT NULL, + `serial` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `warranty_class` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `plate_number` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, + `first_name` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `last_name` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `mobile_number` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `status` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL, + `date_create` datetime NOT NULL, + `date_purchase` date NOT NULL, + `date_expire` date DEFAULT NULL, + `date_claim` date DEFAULT NULL, + `flag_activated` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `UNIQ_88D71CF27096A49F` (`claim_id`), + UNIQUE KEY `UNIQ_88D71CF2D374C9DC` (`serial`), + KEY `IDX_88D71CF24AA75DF2` (`bty_model_id`), + KEY `IDX_88D71CF2987A584A` (`bty_size_id`), + KEY `IDX_88D71CF2A78D0AE` (`sap_bty_id`), + CONSTRAINT `FK_88D71CF24AA75DF2` FOREIGN KEY (`bty_model_id`) REFERENCES `battery_model` (`id`), + CONSTRAINT `FK_88D71CF27096A49F` FOREIGN KEY (`claim_id`) REFERENCES `warranty` (`id`), + CONSTRAINT `FK_88D71CF2987A584A` FOREIGN KEY (`bty_size_id`) REFERENCES `battery_size` (`id`), + CONSTRAINT `FK_88D71CF2A78D0AE` FOREIGN KEY (`sap_bty_id`) REFERENCES `sap_battery` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `warranty` +-- + +LOCK TABLES `warranty` WRITE; +/*!40000 ALTER TABLE `warranty` DISABLE KEYS */; +/*!40000 ALTER TABLE `warranty` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2019-07-17 8:17:05 -- 2.43.5 From 725ce1b5a733c91cd8b363ff8a76212e59d97ea9 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 18 Jul 2019 05:16:51 +0000 Subject: [PATCH 03/13] Replace the sql dump with one with vehicle manufacturers and makes. Add update info, list vehicle manufacturers to collection. #229 --- ...I - API Controller.postman_collection.json | 183 +++++++++++++++++- ...an_20190717.sql => resq_test_20190717.sql} | 33 +--- 2 files changed, 186 insertions(+), 30 deletions(-) rename postman/{resq_test_clean_20190717.sql => resq_test_20190717.sql} (57%) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index a7f77ec6..a967bc9e 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -217,6 +217,165 @@ } }, "response": [] + }, + { + "name": "[Normal] Update Info", + "event": [ + { + "listen": "test", + "script": { + "id": "27592b25-ba3d-4218-813f-3a9ab710fccc", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Update Info\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "first_name", + "value": "{{first_name}}", + "type": "text" + }, + { + "key": "last_name", + "value": "{{last_name}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/info?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "info" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get Info", + "event": [ + { + "listen": "test", + "script": { + "id": "24efd1b8-ad00-4cb0-beb5-85c014d8a09a", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get Info\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.first_name).to.eql(\"Stiltzkin\");", + " pm.expect(jsonData.data.last_name).to.eql(\"Moogle\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/info?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "info" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] List Vehicle Manufacturers", + "event": [ + { + "listen": "test", + "script": { + "id": "86275f4c-dd2b-42c8-9ac2-c7d7a7d2edfe", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"List vehicle manufacturers\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.manufacturers).to.have.lengthOf(43);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/vehicle/mfgs?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "vehicle", + "mfgs" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] List Vehicle Makes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "" + } + }, + "response": [] } ], "event": [ @@ -243,40 +402,52 @@ ], "variable": [ { - "id": "a1cfb454-de0c-4c74-9a45-c14dc9bf2da0", + "id": "09fcc1bc-23c3-48cb-8586-49a7cf9437d5", "key": "resq_url", "value": "resq.local", "type": "string" }, { - "id": "cf0248b6-ea72-44ca-8de6-ba6a20f9ee9d", + "id": "25934577-a793-4004-badf-63212546aa52", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "069c06e7-6a38-4998-aa62-e3789c615253", + "id": "4e0d2bcf-84bd-4516-b0ef-d28413b62acb", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "c7c3e8e7-3f49-46c0-932d-25cc281c4d23", + "id": "41b11f18-f02c-4721-bee0-7b7e5d277c42", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "8bda1ea8-63bf-400a-a0d7-832e13a273f7", + "id": "d2fb7606-9d27-4a1c-9701-93d807e02796", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "236e99e8-1bb8-412f-9827-3dd955b40172", + "id": "2cd58196-a907-4c21-9753-75a6090f4f1b", "key": "phone_number", "value": "9221111111", "type": "string" + }, + { + "id": "211fab6f-e9f0-4436-a3a0-351b3bf11eb2", + "key": "first_name", + "value": "Stiltzkin", + "type": "string" + }, + { + "id": "2943ce9b-545f-489a-bee6-d3553312fd4c", + "key": "last_name", + "value": "Moogle", + "type": "string" } ] } \ No newline at end of file diff --git a/postman/resq_test_clean_20190717.sql b/postman/resq_test_20190717.sql similarity index 57% rename from postman/resq_test_clean_20190717.sql rename to postman/resq_test_20190717.sql index 0e57cc61..19dbfb8f 100644 --- a/postman/resq_test_clean_20190717.sql +++ b/postman/resq_test_20190717.sql @@ -262,18 +262,9 @@ CREATE TABLE `customer` ( `priv_third_party` tinyint(1) NOT NULL, `priv_promo` tinyint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Dumping data for table `customer` --- - -LOCK TABLES `customer` WRITE; -/*!40000 ALTER TABLE `customer` DISABLE KEYS */; -/*!40000 ALTER TABLE `customer` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `customer_vehicle` -- @@ -304,18 +295,9 @@ CREATE TABLE `customer_vehicle` ( CONSTRAINT `FK_75D403819A19CFC` FOREIGN KEY (`battery_id`) REFERENCES `battery` (`id`), CONSTRAINT `FK_75D4038545317D1` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicle` (`id`), CONSTRAINT `FK_75D40389395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; --- --- Dumping data for table `customer_vehicle` --- - -LOCK TABLES `customer_vehicle` WRITE; -/*!40000 ALTER TABLE `customer_vehicle` DISABLE KEYS */; -/*!40000 ALTER TABLE `customer_vehicle` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `hub` -- @@ -1124,7 +1106,7 @@ CREATE TABLE `service` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1133,6 +1115,7 @@ CREATE TABLE `service` ( LOCK TABLES `service` WRITE; /*!40000 ALTER TABLE `service` DISABLE KEYS */; +INSERT INTO `service` VALUES (1,'Moogle Service #1'),(2,'Moogle Service #2'); /*!40000 ALTER TABLE `service` ENABLE KEYS */; UNLOCK TABLES; @@ -1305,7 +1288,7 @@ CREATE TABLE `vehicle` ( PRIMARY KEY (`id`), KEY `IDX_1B80E486A23B42D` (`manufacturer_id`), CONSTRAINT `FK_1B80E486A23B42D` FOREIGN KEY (`manufacturer_id`) REFERENCES `vehicle_manufacturer` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=22244 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1314,6 +1297,7 @@ CREATE TABLE `vehicle` ( LOCK TABLES `vehicle` WRITE; /*!40000 ALTER TABLE `vehicle` DISABLE KEYS */; +INSERT INTO `vehicle` VALUES (21253,1383,'ZDX 3.7 Sports Coupe',2010,2013,1),(21254,1383,'INTEGRA',1986,2001,1),(21255,1383,'NSX',1991,2005,1),(21256,1383,'MDX',2000,2003,1),(21257,1383,'RDX',2007,2018,1),(21258,1384,'MiTo',2010,2018,1),(21259,1384,'GIULIETTA',2010,2018,1),(21260,1384,'155 - TWIN SPARK 16V',1996,1999,1),(21261,1384,'SPYDER',1998,2006,1),(21262,1384,'4C',2012,2018,1),(21263,1384,'146 - VG',1997,2000,1),(21264,1384,'GTV - 2.0L V6 TURBO',1998,2006,1),(21265,1385,'A5',2007,2018,1),(21266,1385,'A6',1994,2018,1),(21267,1385,'A7 SPORT BACK',2010,2018,1),(21268,1385,'A8',1994,2018,1),(21269,1385,'Q3',2015,2018,1),(21270,1385,'Q5',2009,2018,1),(21271,1385,'Q7',2007,2018,1),(21272,1385,'R8',0,0,0),(21273,1385,'R6',0,0,0),(21274,1385,'S8',0,0,0),(21275,1385,'A6',1995,2018,1),(21276,1385,'Q1',2016,2018,1),(21277,1385,'A1',2010,2018,1),(21278,1385,'A3',2006,2018,1),(21279,1385,'A4',1996,2018,1),(21280,1385,'TT',2000,2018,1),(21281,1385,'Q3',2015,2017,1),(21282,1385,'A1',0,0,0),(21283,1385,'A3',1996,2018,1),(21284,1385,'A4',0,0,0),(21285,1385,'TT',0,0,0),(21286,1386,'BACKHOE',0,0,1),(21287,1387,'MZ40',0,0,1),(21288,1388,'ARNAGE',2000,2009,1),(21289,1388,'AZURE',1995,2009,1),(21290,1388,'CONTINENTAL GT/GTC 6.0 W12',1985,2018,1),(21291,1388,'CONTINENTAL FLYING SPUR',2005,2018,1),(21292,1388,'CONTINENTAL ',1985,2018,1),(21293,1388,'MULSANNE',2010,2018,1),(21294,1389,'3 SERIES BATTERY ON ENGINE',2000,2018,1),(21295,1389,'3 SERIES BATTERY UNDER SEAT/REAR',1999,2018,1),(21296,1389,'316I / 320I / 325I / 328I',1991,2018,1),(21297,1389,'5 SERIES',2000,2018,1),(21298,1389,'523I',1996,2018,1),(21299,1389,'6 SERIES',2004,2018,1),(21300,1389,'7 SERIES',1980,2018,1),(21301,1389,'BMW X5',2007,2018,1),(21302,1389,'M6',2006,2010,1),(21303,1389,'X2',2009,2018,1),(21304,1389,'Z3 ROADSTER',1996,2002,1),(21305,1389,'X6',0,0,0),(21306,1389,'M3',2000,2006,0),(21307,1389,'X3',2005,2018,1),(21308,1389,'1 SERIES',2004,2018,1),(21309,1389,'Z4/M5',2005,2018,1),(21310,1389,'X1',2009,2018,1),(21311,1389,'3 SERIES',1980,2018,1),(21312,1390,'F0 Gli',2009,2018,1),(21313,1390,'F0',0,0,0),(21314,1390,'F5 SURI (DCT)',2005,2018,1),(21315,1390,'L3 GL-I 1.5Li',2011,2018,1),(21316,1390,'F3 1.5Li M/T',2008,2012,1),(21317,1390,'S6 GS-I 2.0Li 4X2',2001,2018,1),(21318,1390,'S6 GS-I 2.4Li 4X2 DCT',2001,2018,1),(21319,1391,'TIGGO',2005,2018,1),(21320,1391,'QQ6',2006,2010,1),(21321,1391,'CHERRY QQ3',2004,2006,1),(21322,1391,'V2',0,0,0),(21323,1391,'COWIN',2010,2013,1),(21324,1391,'A5',2006,2011,1),(21325,1391,'FULWIN2',0,0,0),(21326,1391,'CHERRY A5',2006,2010,1),(21327,1391,'V5',2006,2011,1),(21328,1391,'EASTAR',2003,2014,1),(21329,1391,'KARRY',2006,2013,1),(21330,1392,'AVEO 1.2 LS MT (HATCHBACK)',2004,2013,1),(21331,1392,'AVEO 1.4 SEDAN AT',2002,2013,1),(21332,1392,'AVEO 1.4 SEDAN MT',2004,2012,1),(21333,1392,'CAMARO',2010,2017,1),(21334,1392,'SPARK 1.0 MT HATCH',2011,2012,1),(21335,1392,'SPARK',2013,2018,1),(21336,1392,'SAIL',2016,2018,1),(21337,1392,'CRUZE A/T GAS',2011,2018,1),(21338,1392,'SONIC',2012,2018,1),(21339,1392,'SPIN 1.5 LTS(GAS)',2013,2018,1),(21340,1392,'CAMARO 2LT 3.6V6 / 2SS 6.2V8',2010,2018,1),(21341,1392,'MALIBU 2.4L',2014,2018,1),(21342,1392,'SPIN 1.3 LS/LTZ (DIESEL)',2013,2018,1),(21343,1392,'TRAX',2012,2018,1),(21344,1392,'SONIC 1.4L 4DR/5DR',2012,2018,1),(21345,1392,'SPIN 1.5 LTZ (GAS)',2013,2018,1),(21346,1392,'OPTRA 1.6 LS WAGON MT',2004,2013,1),(21347,1392,'CAPTIVA 2.4 GAS AT 4X2 CUV',2005,2018,1),(21348,1392,'AVEO 1.4 SEDAN MT',2004,2012,0),(21349,1392,'AVEO 1.4 SEDAN AT',2004,2012,0),(21350,1392,'AVEO 1.2 LS MT (HATCHBACK)',2004,2012,1),(21351,1392,'AVEO 1.2 L MT (HATCHBACK)',2004,2012,1),(21352,1392,'OPTRA 1.6 LS WAGON AT',2003,2018,1),(21353,1392,'OPTRA 1.6 LS SEDAN MT',2003,2018,1),(21354,1392,'OPTRA 1.6 LS SEDAN AT',2004,2013,1),(21355,1392,'AVEO 1.2 LS AT (HATCHBACK)',2004,2012,1),(21356,1392,'CAPTIVA 2.4 GAS AT 4X4 CUV',2005,2018,1),(21357,1392,'COLORADO',2014,2018,1),(21358,1392,'MALIBU',2014,2018,1),(21359,1392,'ORLANDO',2011,2018,1),(21360,1392,'ZAFIRA',2002,2014,1),(21361,1392,'COLORADO (2.5/2.8 CRDi)',2004,2018,1),(21362,1392,'TRAILBLAZER',2013,2018,1),(21363,1392,'CRUZE 2.0 CRDi',2011,2018,1),(21364,1392,'CAPTIVA 2.0 CRDI AT 4X4 CUV',2005,2018,1),(21365,1392,'CAPTIVA 2.0 CRDI AT 4X2 CUV',2005,2018,1),(21366,1392,'VENTURE',1997,2005,1),(21367,1392,'TRAVERSE',2009,2018,1),(21368,1392,'LUMINA',2006,0,0),(21369,1392,'HUMMER (H1/H2/H3)',2000,2010,1),(21370,1392,'TAHOE 5.3 V8 4X2 AT',1991,2018,1),(21371,1392,'SILVERADO',0,0,0),(21372,1392,'SUBURBAN 5.3 V8 4x2 AT',2007,2018,1),(21373,1392,'SUBURBAN 5.3 V9 4X2 AT',2007,2018,1),(21374,1393,'DAKOTA',1996,2018,1),(21375,1393,'RAM',1996,2001,1),(21376,1393,'RAM CHARGER (GASOLINE)',1996,2001,1),(21377,1393,'RAM CHARGER (DIESEL)',1996,2001,1),(21378,1393,'800C',0,0,0),(21379,1393,'300C',0,0,0),(21380,1393,'SEBRING',1995,2010,1),(21381,1393,'PACIFICA',2007,2017,1),(21382,1393,'CARAVAN',1996,2018,1),(21383,1393,'TOWN & COUNTRY',2011,2016,1),(21384,1393,'GRAND VOYAGER',0,0,0),(21385,1393,'TOWN & COUNTRY (GAS)',0,0,0),(21386,1393,'TOWN & COUNTRY (DIESEL)',0,0,0),(21387,1393,'GRAND CHEROKEE',1996,2018,1),(21388,1393,'DURANGO',0,0,0),(21389,1394,'RACER',1994,1999,1),(21390,1394,'SUPER SALOON',1989,1999,1),(21391,1394,'PRINCE',1996,1999,1),(21392,1394,'CIELO',1996,1999,1),(21393,1394,'ESPERO',1995,1999,1),(21394,1395,'FEROZA',1989,2018,1),(21395,1395,'HI JET',1989,1999,1),(21396,1395,'CHARADE',1991,1999,1),(21397,1396,'CALIBER',2007,2012,1),(21398,1396,'CHARGER',2006,2018,1),(21399,1396,'CARAVAN',1984,2017,1),(21400,1396,'CHALLENGER',2008,2018,1),(21401,1396,'VIPER',1992,2017,1),(21402,1396,'NEON',1994,2005,1),(21403,1396,'MAGNUM',2005,2008,1),(21404,1396,'JOURNEY',2009,2018,1),(21405,1396,'NITRO',0,0,0),(21406,1396,'DAKOTA',1987,2009,1),(21407,1396,'DURANGO',2011,2018,1),(21408,1397,'550 MARANELLO',1996,2001,1),(21409,1397,'599 GTB FIORANO',2006,2012,1),(21410,1397,'612 SCAGLIETTI',2004,2018,1),(21411,1397,'F355, F430, F599, F612',1999,2018,1),(21412,1397,'FF, F12 BERLINETTA',2012,2018,1),(21413,1397,'458 Italia, 488',2010,2018,1),(21414,1398,'ALL MODELS',1992,1996,1),(21415,1399,'ESCAPE 2.3L',1996,2012,1),(21416,1399,'LYNX',1998,2004,1),(21417,1399,'ESCAPE 2.0L/3.0L',2003,2012,1),(21418,1399,'ESCAPE 3.0 V6',2013,2018,1),(21419,1399,'EVEREST 2,5/3.0 DURATORQ',2007,2015,1),(21420,1399,'EVEREST 2.3L',2005,2013,1),(21421,1399,'RANGER',1999,2014,1),(21422,1399,'RANGER 2.5/3.0 DURATORQ',1999,2014,1),(21423,1399,'RANGER T6 3.2 4X4',2012,2018,1),(21424,1399,'EVEREST 3.2 4X4',2015,2018,1),(21425,1399,'ECOSPORT 1.5',2001,2012,1),(21426,1399,'FOCUS',2005,2017,1),(21427,1399,'FORD FIESTA 1.6 MT STYLE 4 DR',2010,2017,1),(21428,1399,'FORD FIESTA 1.6 MT TREND 5 DR',2010,2017,1),(21429,1399,'FORD FIESTA 1.6 POWERSHIFT SPORTS 4DR',2010,2017,1),(21430,1399,'FORD FIESTA 1.6 POWERSHIFT SPORTS 5DR',2010,2017,1),(21431,1399,'FORD FIESTA 1.6 POWERSHIFT SPORTS 5DT',2010,2017,1),(21432,1399,'FORD FIESTA 1.6 MT TREND 4 DR',2010,2017,1),(21433,1399,'FORD FIESTA',2013,2017,1),(21434,1399,'ESCORT',0,0,1),(21435,1399,'MUSTANG',0,0,1),(21436,1399,'EVEREST',2014,2018,1),(21437,1399,'FOCUS',2005,2018,1),(21438,1399,'FOCUS (DIESEL)',2005,2018,1),(21439,1399,'RANGER',2014,2018,1),(21440,1399,'RANGER T6 2.2',2012,2018,1),(21441,1399,'ESCAPE 2.0/1.6 ECOBOOST',2014,2018,1),(21442,1399,'EVEREST 2.2',2015,2018,1),(21443,1399,'FORD FIESTA 1.0 ECOBOOST',2014,2018,1),(21444,1399,'EXPLORER 2.0 ECOBOOST',2012,2017,1),(21445,1399,'E - 150 CHATEAU WAGON MY',2010,2018,1),(21446,1399,'EXPEDITION',1999,2018,1),(21447,1399,'SPORT TRAC (4X4)',2001,2011,1),(21448,1399,'F150 SUPER CAB (4X4)',1999,2017,1),(21449,1399,'F 150',1999,2018,1),(21450,1399,'EXPLORER',2000,2018,1),(21451,1400,'VIEW TRAVELLER',2011,2018,1),(21452,1400,'TOPLANDER',0,0,1),(21453,1400,'TORNADO',0,0,1),(21454,1400,'VIEW TRANSVAN',0,0,1),(21455,1400,'GRATOUR',0,0,1),(21456,1400,'MPX',2011,2018,1),(21457,1400,'THUNDER',0,0,1),(21458,1400,'THUNDER IRONMAN',0,0,1),(21459,1400,'THUNDER STRIKE',0,0,1),(21460,1400,'TOANO',0,0,1),(21461,1400,'BLIZZARD',2011,2018,1),(21462,1401,'EMGRAND 7',0,0,0),(21463,1401,'EMGRAND 8',0,0,0),(21464,1401,'EMGRAND X7',0,0,0),(21465,1401,'TX4',0,0,0),(21466,1402,'SAVANA',2005,2018,1),(21467,1403,'SAPPHIRE',0,0,0),(21468,1404,'HOVER',0,0,0),(21469,1404,'M4',0,0,0),(21470,1405,'M3',2013,2018,1),(21471,1405,'HAIMA7',2013,2018,1),(21472,1405,'HAIMA1 SUB-COMPACT',2013,2018,1),(21473,1405,'HAIMA2 SUB-COMPACT',2013,2018,1),(21474,1405,'S5 CROSSOVER',2013,2018,1),(21475,1405,'F-STAR (ALL VARIANTS)',2013,2018,1),(21476,1406,'TRUCK',0,0,0),(21477,1407,'ACCORD',1992,2018,1),(21478,1407,'ACCORD 2.4 S AT',2008,2018,1),(21479,1407,'ACCORD 3.5 S - V AT V6',2008,2018,1),(21480,1407,'S2000',1999,2001,1),(21481,1407,'LEGEND',1994,2017,1),(21482,1407,'ACCORD 3.5 S (8-Gen & 9-Gen)',2008,2018,1),(21483,1407,'ODYSSEY',1987,2013,1),(21484,1407,'ACCORD 3.0L',2003,2007,1),(21485,1407,'PILOT',2003,2018,1),(21486,1407,'CITY',1996,2018,1),(21487,1407,'BRIO',2014,2018,1),(21488,1407,'MOBILIO',2015,2018,1),(21489,1407,'BR-V',2016,2018,1),(21490,1407,'JAZZ',0,0,1),(21491,1407,'FIT',0,0,1),(21492,1407,'CITY 1.3 A MT',2008,2017,1),(21493,1407,'CITY 1.3 S MT',2008,2017,1),(21494,1407,'CITY 1.3 S AT',2008,2017,1),(21495,1407,'CITY 1.5 E AT',2008,2017,1),(21496,1407,'JAZZ 1.3 S MT',2008,2017,1),(21497,1407,'JAZZ 1.3 S AT',2008,0,1),(21498,1407,'JAZZ 1.3 V AT',2008,0,1),(21499,1407,'CIVIC 1.8',2007,2018,1),(21500,1407,'CIVIC RS 1.5 TURBO',2016,2018,1),(21501,1407,'CIVIC',1991,2000,1),(21502,1407,'CIVIC 1.8 & 2.0',2011,2016,1),(21503,1407,'ACCORD 2.0L',1993,1997,1),(21504,1407,'BRIO AMAZE',2015,2018,1),(21505,1407,'CIVIC',2006,2018,1),(21506,1407,'CRV',1997,2015,1),(21507,1407,'CR-V 2.0-2.4',2002,2018,1),(21508,1407,'CR-Z',0,0,1),(21509,1407,'HRV',2000,2018,1),(21510,1407,'STREAM',0,0,1),(21511,1407,'EXTREME',0,0,1),(21512,1407,'CIVIC 1.6L',2001,2006,1),(21513,1407,'CIVIC',2001,2005,1),(21514,1408,'H2',0,0,0),(21515,1409,'TUCSON 2.0 GAS 4x2 MT',2004,2012,1),(21516,1409,'CRETA (DIESEL)',2017,2018,1),(21517,1409,'COUPE GLS 2.0 GAS AT',1996,2018,1),(21518,1409,'COUPE GLS 2.7 V6 AT',1996,2018,1),(21519,1409,'EXCEL',1993,1999,0),(21520,1409,'CRETA (GAS)',2017,2018,1),(21521,1409,'ELANTRA GLS 1.6 CRDI',1996,2009,1),(21522,1409,'ATOZ',0,0,0),(21523,1409,'GENESIS TURBO SAT',2008,2018,1),(21524,1409,'ACCENT GL 1.5 CRDI MT',2010,2018,1),(21525,1409,'ACCENT GLS 1.5 CRDI MT',2005,2013,1),(21526,1409,'AZERA GLS 3.3 AT',2004,2018,1),(21527,1409,'SONATA GLS 2.4 GAS AT',1996,2018,1),(21528,1409,'SONATA GLS 2.7 GAS AT',1996,2018,1),(21529,1409,'TIBURON',0,0,1),(21530,1409,'GRACE (GASOLINE)',1995,2006,1),(21531,1409,'MATRIX (CRDI DIESEL)',2004,2010,1),(21532,1409,'TUCSON CRDI DSL 4X4 AT',2004,2018,1),(21533,1409,'PORTER 2.6 DIESEL (CAB CHASSIS)',2005,2018,1),(21534,1409,'PORTER 2.6 DIESEL (SHUTTLE)',2005,2018,1),(21535,1409,'PORTER 2.6 DIESEL (CLOSED VAN)',2005,2018,1),(21536,1409,'PORTER 2.6 DIESEL (DROP SIDE)',2005,2018,1),(21537,1409,'PORTER 2.6 DIESEL (XG)',2005,2018,1),(21538,1409,'SANTA FE 2.7 GLS 4X4 AT GAS',2005,2012,1),(21539,1409,'SANTA FE 2.2 GLS 4X4 AT CRDI DSL',2005,2018,1),(21540,1409,'SANTA FE 2.2 GLS 4x2 AT CRDi DSL',2005,2018,1),(21541,1409,'TUCSON CRDi DSL 4x2 AT',2004,2011,1),(21542,1409,'VERA CRUZ GLS 3.0 V6 CRDI DSL AT 4X4',2006,2018,1),(21543,1409,'GALLOPER',0,0,1),(21544,1409,'H 100 / GRACE',1986,1994,1),(21545,1409,'GRAND STAREX TCI GL MT 12',2007,2018,1),(21546,1409,'GRAND STAREX TCI GLS AT 10',2007,2018,1),(21547,1409,'TRUCK',0,0,1),(21548,1409,'STAREX CRDI VGT GLS AT 12S',2007,2018,1),(21549,1409,'STAREX CRDI VGT GLS AT SS 10S',2007,2018,1),(21550,1409,'STAREX CRDI VGT GLS MT 10S',2007,2018,1),(21551,1409,'STAREX CRDI VGT GLS MT 12S',2007,2018,1),(21552,1409,'STAREX CRDI VGT GOLD AT 10S',2007,2018,1),(21553,1409,'STAREX TCI GL MT 10',2007,2018,1),(21554,1409,'STAREX TCI GL MT 12',2007,2018,1),(21555,1409,'STAREX TCI GLS AT 10',2007,2018,1),(21556,1409,'TUCSON CRDI DSL 4X2 AT',2011,2018,1),(21557,1409,'TUCSON CRDI DSL 4X4 AT',2004,2018,1),(21558,1409,'EON',2015,2018,1),(21559,1409,'I10 1.1 GL NT',2007,2013,1),(21560,1409,'I10 1.1 GLS AT',2007,2013,1),(21561,1409,'I10 1.1 GLS MT',2007,2013,1),(21562,1409,'I10 1.2 GLS AT',2007,2013,1),(21563,1409,'I10 1.2 GLS MT',2007,2013,1),(21564,1409,'I20',2008,2015,1),(21565,1409,'i30',2008,2012,1),(21566,1409,'TUCSON 2.0 GAS 4X2 AT',2004,2018,1),(21567,1409,'GETZ Gas 1.1 MT',2003,2009,1),(21568,1409,'MATRIX (1.6 Gas)',2004,2010,1),(21569,1409,'ELANTRA GLS 1.6/1.8 Gas',2011,2018,1),(21570,1409,'H350',2016,2018,1),(21571,1409,'GETZ',2014,0,1),(21572,1409,'GETZ CRDi 1.5 MT (FL)',2004,2009,1),(21573,1409,'ACCENT GLS 1.5 CRDI MT',2005,2018,1),(21574,1409,'ACCENT GL 1.5 CRDI MT',2010,2018,1),(21575,1409,'ELANTRA',2013,2018,1),(21576,1409,'GENESIS COUPE 2.0 TURBO 6 MT',2013,2018,1),(21577,1409,'GENESIS 3.8 V6 GLS AT',2008,2018,1),(21578,1409,'GENESIS COUPE 3.8 V6 6 MT',2013,2017,1),(21579,1410,'QX56',0,0,0),(21580,1411,'CROSSWIND',1991,2017,1),(21581,1411,'HIGHLANDER',1996,2018,1),(21582,1411,'SPORTIVO',0,0,1),(21583,1411,'NHR',2003,2017,0),(21584,1411,'NKR',2003,2017,0),(21585,1411,'MU-X 2.5Li 4X2/3.0Li 4X4',2014,2018,1),(21586,1411,'D-MAX 3.0 ITEQ 4X2',2002,2013,1),(21587,1411,'D-MAX 2.5Li 4X2/3.0Li 4X4 (New Gen Body)',2014,2018,1),(21588,1411,'FSR 34SL / FVR 34SL',2012,2017,0),(21589,1411,'FTR',1995,2000,0),(21590,1411,'ELF',0,0,0),(21591,1411,'CANTER',0,0,0),(21592,1411,'ALTERRA',2004,2013,1),(21593,1411,'D-MAX 3.0 ITEQ 4X4',2002,2013,1),(21594,1411,'FUEGO',1998,2001,1),(21595,1411,'ALTERRA ZEN',2004,2013,1),(21596,1411,'ALTERRA URVAN CRUIZER',2004,2013,1),(21597,1411,'PICK UP (ALL MODELS)',1990,2018,1),(21598,1411,'BIGHORN',0,0,1),(21599,1411,'NQR',2003,2017,0),(21600,1411,'TROOPER (DIESEL)',1996,2018,1),(21601,1411,'TROOPER (GASOLINE)',1996,2018,1),(21602,1411,'iVan',0,0,1),(21603,1411,'IPV',0,0,1),(21604,1412,'TRUCK',0,0,0),(21605,1413,'JAGUAR S-TYPE',1999,2009,1),(21606,1413,'JAGUAR XJR-TYPE',0,0,1),(21607,1413,'JAGUAR XJ-TYPE',0,0,1),(21608,1413,'JAGUAR XKR-TYPE',0,0,1),(21609,1413,'JAGUAR XK-TYPE',0,0,1),(21610,1413,'JAGUAR XS-TYPE',0,0,1),(21611,1413,'JAGUAR X-TYPE',2001,2009,1),(21612,1413,'XF TYPE',2007,2018,1),(21613,1414,'COMMANDER',0,0,1),(21614,1414,'CHEROKEE',0,0,1),(21615,1414,'WRANGLER',0,0,1),(21616,1415,'CARENS 2.0 Li GAS EX AT',2006,2013,1),(21617,1415,'PRIDE',1990,2000,1),(21618,1415,'SOUL GAS',2009,2018,1),(21619,1415,'SPORTAGE 2.0 L GAS AT',2007,2018,1),(21620,1415,'KIA FORTE',2008,2018,1),(21621,1415,'SEPHIA',0,0,1),(21622,1415,'RIO 1.4L EX SEDAN AT',2007,2018,1),(21623,1415,'RIO 1.4L EX SEDAN MT',2007,2018,1),(21624,1415,'MOJAVE GAS',2008,2012,1),(21625,1415,'SORENTO',2004,2006,1),(21626,1415,'OPTIMA',0,0,1),(21627,1415,'SEDONA',2000,2006,1),(21628,1415,'BESTA 2.2L (DIESEL)',1994,2000,1),(21629,1415,'PREGIO 2.2L (DIESEL)',1994,2000,1),(21630,1415,'CARNIVAL',2000,2018,1),(21631,1415,'SPORTAGE 2.0 LDSL AT CRDi 4x4',2007,2018,1),(21632,1415,'SPORTAGE 2.0 LDSL AT CRDi 4x2',2007,2018,1),(21633,1415,'CARNIVAL EX AT CRDI (LWB)',2007,2018,1),(21634,1415,'CARNIVAL EX AT CRDI (SWB) 8 SEATER',2007,2018,1),(21635,1415,'CARNIVAL LX AT CRDI (LWB)',2007,2018,1),(21636,1415,'CARNIVAL LX AT CRDI (SWB) 8 SEATER',2007,2018,1),(21637,1415,'CARNIVAL LX MT CRDI (SWB) 8 SEATER',2007,2018,1),(21638,1415,'K2700',2005,2018,1),(21639,1415,'CARENS 2.0 Li LX CRDi AT',2006,2018,1),(21640,1415,'CARENS 2.0 Li EX CRDi AT',2006,2018,1),(21641,1415,'PICANTO DLX AT',2007,2018,1),(21642,1415,'CERES',0,0,1),(21643,1415,'PICANTO DLX MT',2007,2018,1),(21644,1415,'SOUL 2.0 GAS',2009,2018,1),(21645,1415,'CARENS 2.0 GAS (1st Gen Body only)',2006,2018,1),(21646,1415,'SPORTAGE 2.0 GAS',2007,2018,1),(21647,1416,'GALLARDO',2003,2013,1),(21648,1416,'AVENTADOR',2011,2018,1),(21649,1416,'MURCIELAGO',2001,2010,1),(21650,1416,'HURRACAN',2014,2018,1),(21651,1416,'DIABLO',1990,2001,1),(21652,1416,'COUNTACH LP400-P',1994,1990,1),(21653,1417,'LR2',1996,1999,1),(21654,1417,'LR3',2017,2018,1),(21655,1417,'DISCOVERY',1996,1999,1),(21656,1417,'RANGE ROVER (4.4, 4.6IS, 4.8IS)',1996,2018,1),(21657,1417,'RANGE ROVER SPORT',2005,2018,1),(21658,1417,'FREELANDER',1996,2014,1),(21659,1418,'GX460',0,0,1),(21660,1418,'RC350/RC-F',2014,2018,1),(21661,1418,'IS300/350',2000,2017,1),(21662,1418,'ES350',1992,2017,1),(21663,1418,'GS460',2001,2017,1),(21664,1418,'IS 300C',2002,2006,1),(21665,1418,'IS300',2000,2017,1),(21666,1418,'LS460 (5-SEATER)',2001,2017,1),(21667,1418,'NX 2.0LI',2014,2015,1),(21668,1418,'RX 3.5Li',1999,2015,1),(21669,1418,'LS460 (4-SEATER)',2001,2017,1),(21670,1418,'LX570',1995,2017,1),(21671,1418,'RX350',1999,2014,1),(21672,1418,'LS460',2001,2017,1),(21673,1419,'NAVIGATOR',0,0,0),(21674,1420,'GRAN TURISMO',2007,2018,1),(21675,1420,'GHIBLI (M157)',2013,2018,1),(21676,1420,'QUATTROPORTE',1973,1990,1),(21677,1421,'MAZDA6',2007,2018,1),(21678,1421,'FAMILIA',0,0,1),(21679,1421,'CX5',2013,2018,1),(21680,1421,'323',1993,2002,1),(21681,1421,'ASTINA',1989,1994,1),(21682,1421,'CX - 7',2006,2012,1),(21683,1421,'MAZDA 3 / 2 / 6 ISTOP',2014,2018,0),(21684,1421,'MAZDA 2 SEDAN',2007,2018,1),(21685,1421,'MAZDA 3',2004,2018,1),(21686,1421,'MAZDA 3 2.0',2003,2018,1),(21687,1421,'RX7',0,0,1),(21688,1421,'626',1993,2018,1),(21689,1421,'MAZDA 6',2004,2018,1),(21690,1421,'MAZDA 6 2.3',0,0,1),(21691,1421,'TRIBUTE',2004,2011,1),(21692,1421,'PREMACY',0,0,1),(21693,1421,'RX8',0,0,1),(21694,1421,'CX-9',2007,2018,1),(21695,1421,'MAZDA 6',2002,2008,1),(21696,1421,'RENESIS',0,0,1),(21697,1421,'POWER VAN E2000 GS 2L',1992,1999,1),(21698,1421,'B2200 PICK-UP',1989,1986,1),(21699,1421,'B2500 PICK-UP',1989,2018,1),(21700,1421,'MPV',1996,1999,1),(21701,1421,'FRIENDEE',0,0,1),(21702,1421,'BT50',0,0,1),(21703,1421,'MX-5 MIATA',2007,2018,1),(21704,1421,'MAZDA 2',2010,2011,1),(21705,1421,'LANTIS',0,0,1),(21706,1421,'MAZDA 2 HATCHBACK',2005,2018,1),(21707,1421,'BT-50 2.2Li 4X2',2011,0,1),(21708,1421,'BT-50 3.2Li 4X4',2011,0,1),(21709,1422,'MUSSO',0,0,0),(21710,1422,'MB100',0,0,0),(21711,1422,'M CLASS',1996,2018,1),(21712,1422,'M CLASS (GLE)',1996,2015,1),(21713,1422,'C230',2006,0,0),(21714,1422,'CL CLASS',2000,2018,1),(21715,1422,'CLK CLASS',1998,2010,1),(21716,1422,'CLS CLASS',2004,2018,1),(21717,1422,'E CLASS',1995,2018,1),(21718,1422,'G CLASS',2000,2018,1),(21719,1422,'GL CLASS',2007,2018,1),(21720,1422,'ML 350/500',1997,2015,1),(21721,1422,'R CLASS',2006,2012,1),(21722,1422,'S SERIES',1998,2006,1),(21723,1422,'SL CLASS',1989,2001,1),(21724,1422,'VIANO',0,0,0),(21725,1422,'S550',1989,2006,1),(21726,1422,'GLC (Old GLK220)',2015,2018,1),(21727,1422,'ML 350/500 (GLE)',1997,2015,1),(21728,1422,'A CLASS',1997,2018,1),(21729,1422,'B CLASS',2005,2018,1),(21730,1422,'C CLASS',1995,2018,1),(21731,1422,'SLK',1997,2018,1),(21732,1422,'AMG-GT',2013,2018,1),(21733,1422,'SL460',1989,2001,1),(21734,1423,'COOPER',0,0,1),(21735,1424,'MIRAGE EL Hatchback',2013,2018,1),(21736,1424,'MIRAGE G4',2015,2018,1),(21737,1424,'LANCER MX*',2000,2018,1),(21738,1424,'ASX 2.0 GLS 4X2 CVT',2011,2018,1),(21739,1424,'ASX 2.0 GLS 4X4 CVT',2011,2018,1),(21740,1424,'ASX 2.0 GLX MT',2011,2018,1),(21741,1424,'EXCEED (GASOLINE)',1986,1994,1),(21742,1424,'FUZION GLS SPORTS',2007,2018,1),(21743,1424,'FUZION GLX',2007,2010,1),(21744,1424,'GRANDIS',2005,2018,1),(21745,1424,'LANCER (BOX TYPE)',1983,1988,1),(21746,1424,'LANCER 2.0',2006,2017,1),(21747,1424,'LANCER EX (GS41; GLX/MX/GT/GT-A/RALLI-ART)',2007,2018,1),(21748,1424,'LANCER GLS CVT',2009,2018,1),(21749,1424,'LANCER GLX M/T',2007,2018,1),(21750,1424,'LANCER GLXI / GLX / GSR / SOHC*',1989,2000,1),(21751,1424,'OUTLANDER GLS',2001,2006,1),(21752,1424,'OUTLANDER GLS SPORTS',2001,2006,1),(21753,1424,'OUTLANDER GLX',2004,2018,1),(21754,1424,'CHARIOT',0,0,1),(21755,1424,'SPACE GEAR**',1994,2007,1),(21756,1424,'SPACE WAGON',1993,2003,1),(21757,1424,'ECLIPSE GT',1990,2012,1),(21758,1424,'GALANT',1989,2005,1),(21759,1424,'GALANT (2.4 MIVEC)',2006,2015,1),(21760,1424,'L300 (GASOLINE)',1987,2018,1),(21761,1424,'MONTERO SPORTS GLS (depending on tray size)',2014,2018,1),(21762,1424,'MONTEROSPORT 2.4Li MIVEC Euro4',2016,2018,1),(21763,1424,'PAJERO (GASOLINE)',1988,2018,1),(21764,1424,'MONTERO SPORTS',2010,2014,1),(21765,1424,'L200',0,0,1),(21766,1424,'ADVENTURE GLX',1999,2018,1),(21767,1424,'ADVENTURE GLS SPORTS',1999,2018,1),(21768,1424,'PAJERO SE',1998,2017,1),(21769,1424,'MONTERO SPORTS GLS',2008,2016,1),(21770,1424,'EXCEED (DIESEL)',1986,1994,1),(21771,1424,'L300 FB (DIESEL)',1987,2018,1),(21772,1424,'PAJERO (DIESEL)',1988,2018,1),(21773,1424,'ADVENTURE GX',1999,2018,1),(21774,1424,'MONTERO SPORTS GLS SE',0,0,1),(21775,1424,'MONTEROSPORT 2.4Li MIVEC Euro4 (All Variants)',2016,2018,1),(21776,1424,'CANTER',0,0,0),(21777,1424,'ADVENTURE SUPER SPORTS',2002,2018,1),(21778,1424,'L300 VERSA VAN',1987,2017,1),(21779,1424,'MONTERO SPORTS',0,0,1),(21780,1424,'MONTERO SPORTS 4X2',0,0,1),(21781,1424,'STRADA GL',1988,2018,1),(21782,1424,'STRADA GLS SPORTS',1990,2018,1),(21783,1424,'STRADA GLS SPORTS CUSTOM EDITION',1991,2018,1),(21784,1424,'STRADA GLX',1989,2018,1),(21785,1424,'MONTEROSPORT 2.4Li MIVEC Euro4',2016,2017,1),(21786,1424,'STRADA GX GLX GLS (New Body)',2015,2018,1),(21787,1424,'PAJERO SUBIC',0,0,1),(21788,1424,'SPACE GEAR',2004,1994,1),(21789,1424,'LANCER MX*',2004,2007,1),(21790,1424,'LANCER EL / GL / GLI',1989,2018,1),(21791,1424,'LANCER GLS',2004,2006,1),(21792,1424,'LANCER EVOLUTION (IV,V,VI, VII, VIII, IX & X)',1995,2018,1),(21793,1424,'ENDEAVOR',2007,2018,1),(21794,1425,'PATROL ROYALE',2012,2018,1),(21795,1425,'CUBE',0,0,1),(21796,1425,'350Z',2002,2009,1),(21797,1425,'370Z',2009,2018,1),(21798,1425,'ALTIMA',1993,1996,1),(21799,1425,'BROUGHAM',2002,2004,1),(21800,1425,'CEFIRO',1989,2018,1),(21801,1425,'EXALTA',2000,2018,1),(21802,1425,'ALTIMA',2015,2018,1),(21803,1425,'SYLPHY',2015,2018,1),(21804,1425,'X-TRAIL (All Variants)',2015,2018,1),(21805,1425,'JUKE 1.6',2016,2018,1),(21806,1425,'350Z MT',0,0,0),(21807,1425,'350Z AT',2002,2009,1),(21808,1425,'MURANO',2003,2013,1),(21809,1425,'350Z AT',2002,2009,1),(21810,1425,'350Z MT',2002,2009,1),(21811,1425,'AD RESORT (GASOLINE)',1994,2018,1),(21812,1425,'BLUEBIRD',1990,1993,1),(21813,1425,'MAXIMA',1987,1991,1),(21814,1425,'SENTRA GS',1995,2018,1),(21815,1425,'SENTRA GSX MT',1994,2018,1),(21816,1425,'SENTRA GX AT',1993,2018,1),(21817,1425,'SENTRA GX MT',1991,2018,1),(21818,1425,'SENTRA GX MT (PWR)',1992,2018,1),(21819,1425,'SUNNY PICK UP',1991,1997,1),(21820,1425,'TEANA 2.3 L 230 JK',2003,2018,1),(21821,1425,'TEANA 2.3 L 230 JM',2009,2013,1),(21822,1425,'VANETTE',1993,2018,1),(21823,1425,'X-TRAIL 2.0 L 2WD',2004,2017,1),(21824,1425,'X-TRAIL 2.5 L 4WD 250',2005,2017,1),(21825,1425,'X-TRAIL 2.5 L 4WD 250X',2006,2017,1),(21826,1425,'350Z MT',2002,2009,1),(21827,1425,'350Z AT',2002,2009,1),(21828,1425,'300 ZX',1990,2018,1),(21829,1425,'PRIMERA',2000,2007,1),(21830,1425,'CALIFORNIA',1973,1990,1),(21831,1425,'CEDRIC',1994,1996,1),(21832,1425,'SERENA 200SX',2006,2018,1),(21833,1425,'SERENA 250 E',2005,2018,1),(21834,1425,'SERENA 250 L',2004,2018,1),(21835,1425,'SERENA 350Z',2007,2018,1),(21836,1425,'SERENA 370Z',2008,2018,1),(21837,1425,'PATROL SAFARI 4.5 GAS',2007,2013,1),(21838,1425,'200SX',0,0,0),(21839,1425,'INFINITI',0,0,0),(21840,1425,'SAFARI 4.5 GAS',2007,2018,1),(21841,1425,'AD RESORT (DIESEL)',1994,1996,1),(21842,1425,'EL GRAND',0,0,0),(21843,1425,'FRONTIER NAVARRA 2.5 CRDI TURBO',2007,2018,1),(21844,1425,'FRONTIER NAVARRA BRUTE 2.5 4X 4 MT',2011,2017,1),(21845,1425,'FRONTIER NAVARRA BRUTE 2.5 XL 4 X 4 MT',2011,2018,1),(21846,1425,'FRONTIER NAVARRA KROME EDITION 2.5 Crdi 4 X 4 MT',2011,2017,1),(21847,1425,'FRONTIER NAVARRA KROME EDITION 2.5 Crdi 4 X 4 AT',2011,2017,1),(21848,1425,'PATROL SAFARI 3.0 DSL',2007,2018,1),(21849,1425,'NAVARRA 2.5 CRDI TURBO',2007,2018,1),(21850,1425,'NAVARRA BRUTE 2.5 XL 4 X 4 MT',2011,2017,1),(21851,1425,'NAVARRA BRUTE 2.5 4X 4 MT',2011,2017,1),(21852,1425,'NAVARRA KROME EDITION 2.5 CRDI 4 X 4 AT',2011,2017,1),(21853,1425,'NAVARRA KROME EDITION 2.5 CRDI 4 X 4 MT',2011,2017,1),(21854,1425,'PATROL',1989,2018,1),(21855,1425,'SAFARI 3.0 DSL',2007,2018,1),(21856,1425,'PATROL SUPER SAFARI',2007,2018,1),(21857,1425,'ARMADA',2004,2018,1),(21858,1425,'BIDA AUV',1989,1996,1),(21859,1425,'CLASSIC PICK UP',1988,1993,1),(21860,1425,'ESTATE 2.7 ( E25 ) CLOSED VAN',2002,2018,1),(21861,1425,'ESTATE 2.7 ( E25 ) NEW ESTATE',2002,2018,1),(21862,1425,'URVAN ESCAPADE',2004,2017,1),(21863,1425,'URVAN ESTATE',2005,2017,1),(21864,1425,'NP300 NAVARA 2.5Li (ALL VARIANTS)',2015,2017,1),(21865,1425,'NV350 URVAN (CARAVAN)',2015,0,1),(21866,1425,'EAGLE',1991,1999,1),(21867,1425,'FRONTIER',1999,2018,1),(21868,1425,'FRONTIER BRAVADO',1999,2014,1),(21869,1425,'PATHFINDER',1989,1999,1),(21870,1425,'TERRANO',1995,2018,1),(21871,1425,'GTR 3.8V6',2012,2015,1),(21872,1425,'VERITA',2000,2018,1),(21873,1425,'ALMERA (N17) 1.2/1.5 (VERSA in the US)',2012,2017,1),(21874,1425,'GRAND LIVINA 1.8 XV ELEGANCE',2007,2018,1),(21875,1425,'SENTRA',1991,2012,1),(21876,1425,'SYLPHY',2015,2018,1),(21877,1425,'VERITAS',2000,2018,1),(21878,1425,'MARCH',0,0,0),(21879,1425,'GRAND LIVINA 1.8 XL ELITE',2006,2018,1),(21880,1425,'GRAND LIVINA 1.8 XR LUXURY',2010,2018,0),(21881,1425,'ACURA',0,0,1),(21882,1425,'ALMERA',0,0,0),(21883,1425,'SENTRA GX MT (PWR)',1991,2018,1),(21884,1426,'OMEGA',1998,2005,1),(21885,1426,'ASTRA',1999,2005,1),(21886,1426,'TIGRA',1999,2005,1),(21887,1426,'VECTRA',1998,2005,1),(21888,1427,'1007',2005,2009,1),(21889,1427,'407',2003,2010,1),(21890,1427,'206',1998,2012,1),(21891,1427,'307',2001,2014,1),(21892,1427,'PARTNER VAN',2013,2018,1),(21893,1428,'997',0,0,0),(21894,1428,'911 (TURBO)',1993,2018,1),(21895,1428,'911 GT2',1993,2018,1),(21896,1428,'CAYENNE (ALL TRIMS)',2003,2018,1),(21897,1428,'BOXSTER',1996,2018,1),(21898,1428,'CAYMAN (ALL TRIMS)',1997,2018,1),(21899,1428,'PANAMERA',2010,2018,1),(21900,1428,'MACAN (ALL VARIANTS)',2013,2018,1),(21901,1429,'WIRA 1.3GLi, 1.5 Gli',1994,1998,1),(21902,1429,'WIRA 1.6',1994,1998,1),(21903,1430,'TIVOLI XLS (Long Wheelbase)',2016,2018,1),(21904,1430,'ACTYON',1997,2010,1),(21905,1430,'KYRON',2005,2014,1),(21906,1430,'MUSSO',1997,2018,1),(21907,1430,'REXTON',2001,2018,1),(21908,1430,'RHINO',2001,2018,1),(21909,1430,'RODIUS',2004,2018,1),(21910,1430,'TIVOLI',2016,2018,1),(21911,1431,'STI',2009,2018,1),(21912,1431,'IMPREZA 2.5 WRX',2009,2018,1),(21913,1431,'FORESTER 2.0',2007,2018,1),(21914,1431,'IMPREZA',2009,2018,1),(21915,1431,'BRZ',2017,2018,1),(21916,1431,'TRIBECA',2006,2014,1),(21917,1431,'OUTBACK 3.0',2009,2018,1),(21918,1431,'LEGACY',2008,2018,1),(21919,1431,'IMPREZA 2.5 WRX STI',2009,2018,1),(21920,1431,'FORESTER 2.5',2007,2018,1),(21921,1431,'LEVORG',2014,2018,1),(21922,1432,'KIZASHI',0,0,0),(21923,1432,'GRAND VITARA',2001,2015,1),(21924,1432,'GRAND VITARA',2007,2018,1),(21925,1432,'CELERIO',2014,2018,1),(21926,1432,'JIMNY',2004,2018,1),(21927,1432,'ALTO',2009,2018,1),(21928,1432,'S X 4 AT 1.6 DR AERO',2006,2018,1),(21929,1432,'S X 4 AT 1.6 DR CROSS OVER',2013,2016,1),(21930,1432,'ERTIGA',2014,2018,1),(21931,1432,'SUPER CARRY',1985,1991,1),(21932,1432,'BAYAN CAB',1996,1999,1),(21933,1432,'BRAVO',2000,2006,1),(21934,1432,'ESTEEM WAGON',1996,1999,1),(21935,1432,'SAMURAI',1989,2003,1),(21936,1432,'VITARA',1995,2018,1),(21937,1432,'WAGON R',1993,2018,1),(21938,1432,'XL 7',2001,2005,1),(21939,1432,'SOLIO',2016,2018,1),(21940,1432,'SWIFT',2005,2017,1),(21941,1432,'APV',2004,2018,1),(21942,1432,'CIAZ / SWIFT (US Version)',2016,2018,1),(21943,1433,'PICK UP',1994,1996,1),(21944,1433,'SUPER ACE (DIESEL) 3-CYLINDER',2014,2018,1),(21945,1433,'XENON PICK UP',2014,2018,1),(21946,1433,'ACE',2014,2018,1),(21947,1433,'VISTA (PETROL)',2014,2018,1),(21948,1433,'MANZA (PETROL)',2014,2018,1),(21949,1433,'VISTA (DIESEL)',2014,2018,1),(21950,1433,'MANZA (DIESEL)',2014,2018,1),(21951,1433,'INDIGO / INDICA (DIESEL)',2014,2018,1),(21952,1434,'INNOVA (V-type)',2005,2015,1),(21953,1434,'INNOVA (G-type)',2005,2015,1),(21954,1434,'INNOVA (E-type)',2005,2015,1),(21955,1434,'TAMARAW / REVO (GASOLINE)',1997,2007,1),(21956,1434,'TAMARAW / REVO SPORT (GASOLINE)',1997,2007,1),(21957,1434,'ALPHARD 2.4 (GASOLINE)',2010,2018,1),(21958,1434,'RAV 4',1996,2018,1),(21959,1434,'ZION',0,0,0),(21960,1434,'BB',0,0,0),(21961,1434,'86',0,0,0),(21962,1434,'CAMRY',1996,2018,1),(21963,1434,'SIENNA',0,0,0),(21964,1434,'MR2',0,0,0),(21965,1434,'LAND CRUISER / PRADO (GASOLINE)',1991,2018,1),(21966,1434,'INNOVA DIESEL',2005,2015,1),(21967,1434,'CRESSIDA',1992,2018,1),(21968,1434,'CROWN ALL MODELS',1989,2018,1),(21969,1434,'NOAH',0,0,0),(21970,1434,'FORTUNER (Gas)',2006,2015,1),(21971,1434,'TAMARAW / REVO (DIESEL)',1998,2018,1),(21972,1434,'TAMARAW / REVO SPORT (DIESEL)',1998,2018,1),(21973,1434,'PREVIA (Gasoline)',2000,2018,1),(21974,1434,'EXSIOR',0,0,0),(21975,1434,'LUCIDA',0,0,0),(21976,1434,'CAMRY',1996,2018,1),(21977,1434,'PREVIA',2000,2018,1),(21978,1434,'LAND CRUISER 200 5.7 V8',2008,2018,1),(21979,1434,'HI ACE GRANDIA',1999,2018,1),(21980,1434,'FORTUNER (Diesel)',2005,2015,1),(21981,1434,'FJ CRUISER',2015,2018,1),(21982,1434,'HI LUX (GASOLINE)',2006,2015,1),(21983,1434,'HI LUX 4X4 / 2X4 (DIESEL)',1993,2015,1),(21984,1434,'LAND CRUISER / PRADO (DIESEL)',1991,2018,1),(21985,1434,'HI-LUX',1993,2018,1),(21986,1434,'4RUNNER',2000,2015,1),(21987,1434,'EMINA',0,0,0),(21988,1434,'COASTER',0,0,0),(21989,1434,'CROWN all models (Diesel)',1989,2018,1),(21990,1434,'PREVIA (Diesel)',0,0,0),(21991,1434,'SEQUIOA',0,0,0),(21992,1434,'HI ACE (All Trims)',2006,2018,1),(21993,1434,'HI ACE (DIESEL)',1999,2018,1),(21994,1434,'HI ACE (GASOLINE)',1994,2018,1),(21995,1434,'HI ACE GRANDIA **',1999,2018,1),(21996,1434,'WIGO',2014,2018,1),(21997,1434,'VIOS',2015,2016,1),(21998,1434,'AVANZA 1.3',2004,2014,1),(21999,1434,'PRIUS 1.8',2003,2015,1),(22000,1434,'VITZ',0,0,0),(22001,1434,'SOLUNA',1986,1991,1),(22002,1434,'COROLLA all models / ALTIS*',1989,2018,1),(22003,1434,'LITE ACE',1990,2018,1),(22004,1434,'RAV 4',1996,2018,1),(22005,1434,'VIOS',2003,2018,1),(22006,1434,'INNOVA (J-type)',2005,2015,1),(22007,1434,'ALTIS',0,0,0),(22008,1434,'COROLLA (ALTIS) E130',1994,2007,1),(22009,1434,'CORONA',1989,2018,1),(22010,1434,'ECHO',2000,2018,1),(22011,1434,'VIOS',2007,2018,1),(22012,1434,'YARIS',2000,2015,1),(22013,1434,'CELICA',0,0,0),(22014,1434,'TOWN ACE GAS',0,0,0),(22015,1434,'AVANZA 1.5',2004,2018,1),(22016,1434,'VIOS',2001,2005,1),(22017,1434,'PRIUS',2003,2015,1),(22018,1434,'INNOVA AN140 TR (Gasoline)',2016,2018,1),(22019,1434,'HI-LUX DIESEL',2017,2018,1),(22020,1434,'FORTUNER (Diesel)',2016,2018,1),(22021,1434,'HILUX 2.4/2.8Li',2015,2018,1),(22022,1434,'INNOVA AN140 GD (Diesel)',2016,2018,1),(22023,1435,'KOMBI',0,0,0),(22024,1435,'POLO',1996,2018,1),(22025,1435,'CARAVELLE',1996,2018,1),(22026,1435,'TOUAREG',2007,2018,1),(22027,1435,'Golf GTI (Gas)',2013,2018,1),(22028,1435,'Golf 1.4. TSI (Gas)',2013,2018,1),(22029,1435,'GOLF',0,0,0),(22030,1435,'BORA',0,0,0),(22031,1435,'BEETLE',2013,2018,1),(22032,1435,'PASSAT',2013,2018,1),(22033,1435,'Jetta 2.0 TDI MT (Diesel)',2013,2018,1),(22034,1435,'Jetta 1.2 TSI MT (Gas)',2013,2018,1),(22035,1435,'Jetta 1.4 TSI DSG (Gas)',2013,2018,1),(22036,1435,'Jetta 2.0 TSI DSG (Gas)',2013,2018,1),(22037,1435,'Tiguan 2.0 TDI AT (Diesel)',2007,2018,1),(22038,1435,'Polo Notch 1.6 TDI MT (Diesel)',2013,2018,1),(22039,1435,'Polo Notch 1.6 MPI AT (Gas)',2013,2018,1),(22040,1435,'Caddy 1.6 (Diesel)',2013,2018,1),(22041,1435,'Caddy 2.0 (Diesel)',2013,2018,1),(22042,1435,'Beetle 1.2 TSI MT (Gas)',2013,2018,1),(22043,1435,'Beetle 1.4 TSI DSG (Gas)',2013,2018,1),(22044,1435,'Jetta 1.6 TDI (Diesel)',2013,2018,1),(22045,1435,'Touran 2.0 TDI (Gasoline)',2013,2018,1),(22046,1435,'Passat 2.0 (Gas)',2013,2018,1),(22047,1435,'Crafter (Diesel)',2006,2018,1),(22048,1435,'T5 Multivan (Diesel)',2003,2018,1),(22049,1435,'TIGUAN',2007,2018,1),(22050,1435,'Tiguan 1.4 TSI MT (Gas)',2007,2018,1),(22051,1435,'Touareg 3.0 TDI (Diesel)',2007,2018,1),(22052,1436,'960',0,0,1),(22053,1436,'S60',2000,2018,1),(22054,1436,'S80',1998,2016,1),(22055,1436,'XC70',1998,2016,1),(22056,1436,'XC90',2003,2018,1),(22057,1436,'850 / 850R',1999,2018,1),(22058,1436,'XC60',2008,2018,1),(22059,1436,'V70',1996,2007,1),(22060,1436,'V50',0,0,1),(22061,1436,'C70',1997,2014,1),(22062,1436,'S70',1996,2000,1),(22063,1436,'S40 / V40',1995,2011,1),(22064,1436,'S60',2000,2018,1),(22065,1436,'C30',2007,2013,1),(22066,1383,'TL/TLX 3.2',1996,2018,1),(22067,1438,'ESCALADE',0,0,1),(22068,1439,'BENNI',0,0,1),(22069,1440,'CHERRY QQ3',2004,2006,1),(22070,1440,'TIGGO',2005,2018,0),(22071,1440,'V5',2006,2011,1),(22072,1441,'TOWING TRACKTOR CT50',0,0,0),(22073,1442,'E-BIKE',0,0,0),(22074,1443,'FORKLIFT',0,0,0),(22075,1444,'GENSET',0,0,0),(22076,1445,'GOLFCART',0,0,0),(22077,1446,'JEEPNEY',0,0,0),(22078,1447,'HUNTER',0,0,0),(22079,1448,'TRACTOR',0,0,0),(22080,1449,'TRUCK',0,0,0),(22081,1450,'GT',0,0,0),(22082,1451,'MG3',0,0,0),(22083,1452,'S',0,0,0),(22084,1453,'OWNER TYPE JEEP',0,0,0),(22085,1455,'SPIDER/SPYDER',0,0,0),(22086,1456,'900S',0,0,0),(22087,1457,'SOLAR PANEL',0,0,0),(22088,1458,'SPEED BOAT',0,0,0),(22089,1459,'JEEP',0,0,0),(22090,1385,'RS6',0,0,0),(22091,1392,'CORVETTE',0,0,0),(22092,1399,'MAINLINE',0,0,0),(22093,1399,'WINDSTAR',0,0,0),(22094,1431,'XV',0,0,1),(22095,1404,'COOL BEAR',0,0,0),(22096,1424,'DELICA',0,0,1),(22097,1411,'FORWARD',0,0,0),(22098,1409,'VELOSTER',0,0,1),(22099,1421,'CX-3',2015,2018,1),(22100,1421,'MAZDA2 SKYACTIV',0,0,0),(22101,1421,'MAZDA3 SKYACTIV',0,0,0),(22102,1421,'MAZDA6 SKYACTIV',0,0,0),(22103,1427,'2008',2012,2018,1),(22104,1427,'301',2012,2018,1),(22105,1427,'308',2012,2018,1),(22106,1427,'5008',2012,2018,1),(22107,1427,'RCZ',2012,2018,1),(22108,1434,'ESTIMA',0,0,0),(22109,1434,'GRANVIA',0,0,0),(22110,1434,'MRS',0,0,0),(22111,1434,'EXSURE 2.0',0,0,0),(22112,1434,'STARLET (STARLET)',0,0,0),(22113,1434,'TERCEL',0,0,0),(22114,1434,'REGIUS',0,0,0),(22115,1434,'PREMIO',0,0,0),(22116,1422,'C180',0,0,0),(22117,1422,'SLS',2010,2014,1),(22118,1411,'KB CAB',0,0,1),(22119,1411,'BIGHORN-RBF',1992,0,1),(22120,1434,'SCION',0,0,0),(22121,1434,'WAGON',0,0,0),(22122,1427,'508',2012,2018,1),(22123,1430,'STAVIC',0,0,1),(22124,1432,'DZIRE',0,0,1),(22125,1407,'WAGON',0,0,1),(22126,1407,'CAPA',0,0,1),(22127,1409,'H100',1986,1994,1),(22128,1425,'SKYLINE',0,0,1),(22129,1392,'Duramax',2015,2018,0),(22130,1409,'County',2009,2009,0),(22131,1434,'IST',0,0,0),(22132,1415,'XYLO',2000,2010,1),(22133,1387,'X424',2015,0,1),(22134,1460,'TRACTOR 2201',2000,0,0),(22135,1462,'ROLLS ROYCE',0,0,1),(22136,1424,'EXPANDER',2018,0,1),(22137,1434,'RUSH',2000,2018,1),(22138,1416,'URUS',2000,2018,1),(22139,1385,'A8',2000,2018,1),(22140,1413,'F-TYPE',2013,2018,1),(22141,1417,'RANGE ROVER VELAR',2017,2018,1),(22142,1463,'QUATTROPORTE',0,2018,1),(22143,1420,'LEVANTE',2016,2018,1),(22144,1422,'VANEO',1997,2004,1),(22145,1427,'1007',2005,2009,1),(22146,1427,'206',1998,2012,1),(22147,1427,'307',2001,2014,1),(22148,1420,'BITURBO',1981,1994,1),(22149,1418,'NX300H/RX450H',2016,2018,1),(22150,1435,'TOURAN',2013,2018,1),(22151,1389,'Z3 ROADSTER',1996,2002,1),(22152,1392,'CAMARO 2LT 3.6V6',2010,2018,1),(22153,1413,'E-PACE',2017,2018,1),(22154,1413,'X-TYPE',2001,2009,1),(22155,1417,'DISCOVERY SPORT',2015,2018,1),(22156,1417,'LAND ROVER EVOQUE',2011,2018,1),(22157,1422,'CLA CLASS',2013,2018,1),(22158,1427,'407',2003,2010,1),(22159,1436,'C70',1997,2014,1),(22160,1393,'TOWN AND COUNTRY',2007,2014,1),(22161,1427,'EXPERT',2013,2018,1),(22162,1464,'APE',2000,2018,1),(22163,1465,'FIREBIRD',1973,0,1),(22164,1396,'COLT',1973,0,1),(22165,1466,'APE',2016,2018,1),(22167,1434,'AVANZA 1.3',2015,2018,1),(22168,1392,'SAVANNAH',2014,2019,1),(22169,1389,'X1 TO X7',2001,2015,1),(22170,1392,'TRAILBLAZER',2005,2013,1),(22171,1425,'DATSUN',1990,0,1),(22172,1399,'EVEREST 2.3L',2015,2018,1),(22173,1399,'RANGER 2.5/3.0 DURATORQ',2014,2018,1),(22174,1407,'CRV ',2006,2018,1),(22175,1409,'TUCSON 2.0 GAS 4X2 MT',2013,2018,1),(22176,1409,'TUCSON CRDI DSL 4X2 AT',2011,2018,1),(22177,1409,'TUCSON TUCSON DSL 4X4 AT',2016,2018,1),(22178,1411,'ALTERRA',2014,2018,1),(22179,1434,'FORTUNER (Gas)',2015,2018,1),(22180,1434,'HI LUX 2.4/2.8 LI (DIESEL)',2016,2018,1),(22181,1427,'301C',2018,0,1),(22182,1467,'MINI EXCAVATOR',0,0,0),(22183,1451,'MG350',2018,0,1),(22184,1424,'MIRAGE GLX',2014,2018,1),(22185,1424,'LANCER JT',2000,2007,1),(22186,1425,'POWER PICK UP',1991,1999,1),(22187,1425,'URVAN 2.7 (E24); 3.0 (E25) ',1996,2015,1),(22188,1425,'AD RESORT (DIESEL)',1994,1996,1),(22189,1427,'208',2012,2018,1),(22190,1434,'CROWN',1989,1999,1),(22191,1434,'ECHO',2000,2005,1),(22192,1434,'HI ACE LXV (Extended)',2017,2018,1),(22193,1434,'YARIS-ATIV (231B) QD Variant',2018,2018,1),(22194,1434,'VIOS',2018,2018,1),(22195,1434,'VIOS (YARIS SEDAN) XP150 (381A)',2013,2018,1),(22196,1434,' Yaris-ATIV (231B)',2013,2018,1),(22197,1434,'VIOS (Yaris Sedan) XP40',2002,2013,1),(22198,1434,'XP90 (482L)',2002,2013,1),(22199,1434,'CORONA T170',1990,1998,1),(22200,1434,'CORONA T190',1990,1998,1),(22201,1434,'INNOVA (Gas Low)',2007,2015,1),(22202,1434,'INNOVA (Gas High)',2007,2015,1),(22203,1436,'XC70 Cross Country',1998,2016,1),(22204,1436,'S90',1996,1998,1),(22205,1436,' V90 I',1996,1998,1),(22206,1436,'850',1991,1995,1),(22207,1436,' 940',1991,1995,1),(22208,1436,' 950',1991,1995,1),(22209,1436,'340',1976,1991,1),(22210,1436,'480',1976,1991,1),(22211,1436,'240',1974,1993,1),(22212,1436,'760',1983,1993,1),(22213,1388,'BENTAYGA',2015,2019,1),(22214,1388,'Continental, Coupe',1985,2018,1),(22215,1388,'Cabriolet 4.0 V8',1985,2018,1),(22216,1391,'COWIN',2010,2013,1),(22217,1391,'COWIN',2010,2013,1),(22218,1393,'JEEP WRANGLER (RUBICON UNLIMITED)',2006,2018,1),(22219,1393,' JEEP GRAND CHEROKEE',1996,1998,1),(22220,1393,' JEEP GRAND CHEROKEE',2002,2011,1),(22221,1397,'GTC4 LUSSO',2004,2018,1),(22222,1397,'812 SUPERFAST',2012,2018,1),(22224,1409,'KONA 1.6T-GDI',2018,2018,1),(22225,1415,'STINGER',0,2018,1),(22226,1417,'DEFENDER',1990,2016,1),(22227,1418,'LS600h',1990,2017,1),(22228,1418,'CT200H',2011,2015,1),(22229,1418,'LC500',2016,2018,1),(22230,1422,'SLS AMG',2010,2013,1),(22231,1422,'GLE Coupe',2015,2018,1),(22232,1415,'CARNIVAL (SEDONA)',2000,2006,1),(22233,1424,'ROSA',1999,2018,1),(22234,1411,'WIZARD',2000,2019,1),(22235,1425,'ULTRA',2000,2018,1),(22236,1424,'MIGHTY MAX',0,2018,1),(22237,1407,'RIDGELINE',2000,2017,1),(22238,1392,'CASSIA',2010,2019,1),(22239,1392,'SUBURBAN 5.3 V9 4x2 AT',1999,2006,1),(22240,1393,'TOWN & COUNTRY',1997,2010,1),(22241,1399,'ECOSPORT 1.5',2013,2018,1),(22242,1468,'TR4',1950,2018,1),(22243,1434,'TUNDRA',1999,2015,1); /*!40000 ALTER TABLE `vehicle` ENABLE KEYS */; UNLOCK TABLES; @@ -1329,7 +1313,7 @@ CREATE TABLE `vehicle_manufacturer` ( `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, `flag_mobile` tinyint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1469 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1338,6 +1322,7 @@ CREATE TABLE `vehicle_manufacturer` ( LOCK TABLES `vehicle_manufacturer` WRITE; /*!40000 ALTER TABLE `vehicle_manufacturer` DISABLE KEYS */; +INSERT INTO `vehicle_manufacturer` VALUES (1383,'ACURA',1),(1384,'ALFA ROMEO',0),(1385,'AUDI',1),(1386,'BACKHOE',0),(1387,'BAIC',0),(1388,'BENTLEY',0),(1389,'BMW',1),(1390,'BYD',0),(1391,'CHERY',1),(1392,'CHEVROLET',1),(1393,'CHRYSLER',1),(1394,'DAEWOO',1),(1395,'DAIHATSU',1),(1396,'DODGE',1),(1397,'FERRARI',1),(1398,'FIAT UNO',1),(1399,'FORD',1),(1400,'FOTON',1),(1401,'GEELY',0),(1402,'GMC',1),(1403,'GOLDEN DRAGON',0),(1404,'GREATWALL',0),(1405,'HAIMA',0),(1406,'HINO',0),(1407,'HONDA',1),(1408,'HUMMER',1),(1409,'HYUNDAI',1),(1410,'INFINITI',1),(1411,'ISUZU',1),(1412,'JAC',0),(1413,'JAGUAR',1),(1414,'JEEP',1),(1415,'KIA',1),(1416,'LAMBORGHINI',0),(1417,'LAND ROVER',1),(1418,'LEXUS',1),(1419,'LINCOLN',1),(1420,'MASERATI',0),(1421,'MAZDA',1),(1422,'MERCEDES BENZ',1),(1423,'MINI',1),(1424,'MITSUBISHI',1),(1425,'NISSAN',1),(1426,'OPEL',1),(1427,'PEUGEOT',1),(1428,'PORSCHE',1),(1429,'PROTON',1),(1430,'SSANGYONG',1),(1431,'SUBARU',1),(1432,'SUZUKI',1),(1433,'TATA',1),(1434,'TOYOTA',1),(1435,'VOLKSWAGEN',1),(1436,'VOLVO',1),(1438,'CADILLAC',1),(1439,'CHANA',0),(1440,'CHERY NA',0),(1441,'CLARK',0),(1442,'E-BIKE',0),(1443,'FORKLIFT',0),(1444,'GENSET',0),(1445,'GOLF CART',0),(1446,'JEEPNEY',0),(1447,'JMC',0),(1448,'LEYLAND',0),(1449,'MAN',0),(1450,'MGB',0),(1451,'MG',0),(1452,'MINI COOPER',0),(1453,'OWNER TYPE JEEP',0),(1455,'ROADSTER',0),(1456,'SAAB',0),(1457,'SOLAR PANEL',0),(1458,'SPEED BOAT',0),(1459,'WRANGLER',0),(1460,'KUBOTA',0),(1461,'Rolls Royce',0),(1462,'ROLLS ROYCE',0),(1463,'MESERATI',0),(1464,'PELAGGIO',0),(1465,'PONTIAC',0),(1466,'PIAGGIO',0),(1467,'BRUDER',0),(1468,'TRIUMPH',1); /*!40000 ALTER TABLE `vehicle_manufacturer` ENABLE KEYS */; UNLOCK TABLES; @@ -1397,4 +1382,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-07-17 8:17:05 +-- Dump completed on 2019-07-17 9:47:48 -- 2.43.5 From 6463756ed5face322cceb268f60a95527072eb76 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 18 Jul 2019 09:31:13 +0000 Subject: [PATCH 04/13] Add more test scripts for API Controller. Add data to sql file for testing. #229 --- postman/PoC Resq.postman_environment.json | 4 +- ...I - API Controller.postman_collection.json | 447 +++++++++++++++++- .../{resq_test_20190717.sql => resq_test.sql} | 5 + 3 files changed, 443 insertions(+), 13 deletions(-) rename postman/{resq_test_20190717.sql => resq_test.sql} (95%) diff --git a/postman/PoC Resq.postman_environment.json b/postman/PoC Resq.postman_environment.json index c1c10ff6..8b275b29 100755 --- a/postman/PoC Resq.postman_environment.json +++ b/postman/PoC Resq.postman_environment.json @@ -10,10 +10,10 @@ { "key": "api_key", "value": "5d2eedb4b4714", - "enabled": true + "enabled": false } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2019-07-17T10:22:33.397Z", + "_postman_exported_at": "2019-07-18T09:27:17.254Z", "_postman_exported_using": "Postman/7.2.2" } \ No newline at end of file diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index a967bc9e..475612ce 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -26,9 +26,9 @@ " // get session id value", " let session_id = jsonData.data.session_id;", " ", - " // store the session_id value as an environment variable. The session id is the api_key in calls requiring an api_key", + " // store the session_id value as a global variable. The session id is the api_key in calls requiring an api_key", " ", - " pm.environment.set(\"api_key\", session_id);", + " pm.globals.set(\"api_key\", session_id);", "});" ], "type": "text/javascript" @@ -368,11 +368,376 @@ }, { "name": "[Normal] List Vehicle Makes", + "event": [ + { + "listen": "test", + "script": { + "id": "74a802f4-f8ea-4059-a18a-206d29a50199", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"List Vehicle Makes\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.manufacturer.name).to.eql(\"VOLKSWAGEN\");", + " pm.expect(jsonData.data.makes).to.have.lengthOf(27);", + " pm.expect(jsonData.data.makes[0].make).to.eql(\"BEETLE 2013 - 2018\");", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "GET", "header": [], "url": { - "raw": "" + "raw": "{{resq_url}}/api/vehicle/mfgs/{{mfg_id}}/makes?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "vehicle", + "mfgs", + "{{mfg_id}}", + "makes" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Add Vehicle", + "event": [ + { + "listen": "test", + "script": { + "id": "efd6f228-c8d6-4e52-a9d1-fca7b5e3220e", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Add vehicle\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data).to.have.property(\"cv_id\");", + " ", + " // store customer vehicle id for update vehicle", + " let cv_id = jsonData.data.cv_id;", + " pm.globals.set(\"cv_id\", cv_id);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "make_id", + "value": "{{make_id}}", + "type": "text" + }, + { + "key": "name", + "value": "{{name}}", + "type": "text" + }, + { + "key": "plate_num", + "value": "{{plate_num}}", + "type": "text" + }, + { + "key": "model_year", + "value": "{{model_year}}", + "type": "text" + }, + { + "key": "color", + "value": "{{color}}", + "type": "text" + }, + { + "key": "condition", + "value": "{{condition}}", + "type": "text" + }, + { + "key": "fuel_type", + "value": "{{fuel_type}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/vehicles?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "vehicles" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Update Vehicle", + "event": [ + { + "listen": "test", + "script": { + "id": "8cd334bb-4032-47f3-9dcd-8c893135ac7d", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Update vehicle\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.cv_id).to.eql(pm.globals.get(\"cv_id\"));", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "make_id", + "value": "{{make_id}}", + "type": "text" + }, + { + "key": "name", + "value": "{{name}}", + "type": "text" + }, + { + "key": "plate_num", + "value": "{{plate_num}}", + "type": "text" + }, + { + "key": "model_year", + "value": "{{model_year}}", + "type": "text" + }, + { + "key": "color", + "value": "{{color}}", + "type": "text" + }, + { + "key": "condition", + "value": "{{condition}}", + "type": "text" + }, + { + "key": "fuel_type", + "value": "{{fuel_type}}", + "type": "text" + }, + { + "key": "wty_code", + "value": "{{wty_code}}", + "type": "text" + }, + { + "key": "wty_expire", + "value": "{{wty_expire}}", + "type": "text" + }, + { + "key": "is_motolite", + "value": "1", + "type": "text" + }, + { + "key": "is_active", + "value": "1", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/vehicles/{{cv_id}}?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "vehicles", + "{{cv_id}}" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] List Vehicles", + "event": [ + { + "listen": "test", + "script": { + "id": "82efd001-0a54-4c45-b8b5-d996a197a3a6", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"List vehicles\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.vehicles.length).to.be.gt(0);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/vehicles?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "vehicles" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] List Promos", + "event": [ + { + "listen": "test", + "script": { + "id": "5263af3d-5f82-4bef-9575-c0771e78fe1e", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"List promos\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " //pm.expect(jsonData.data.makes).to.have.lengthOf(9);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/promos?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "promos" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get Compatible Batteries", + "event": [ + { + "listen": "test", + "script": { + "id": "8d860fb0-7e8b-4ac9-b229-15df1ade3677", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get compatible batteries\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " ", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/vehicles/{{make_id}}/compatible_batteries?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "vehicles", + "{{make_id}}", + "compatible_batteries" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] } }, "response": [] @@ -402,52 +767,112 @@ ], "variable": [ { - "id": "09fcc1bc-23c3-48cb-8586-49a7cf9437d5", + "id": "b92a8775-f072-45d6-ba3c-c5c1e697026b", "key": "resq_url", "value": "resq.local", "type": "string" }, { - "id": "25934577-a793-4004-badf-63212546aa52", + "id": "279d5bec-f9d3-431c-8ef7-8bce23f18f0f", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "4e0d2bcf-84bd-4516-b0ef-d28413b62acb", + "id": "a747bcd5-9367-4394-97b1-c3caca435f8d", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "41b11f18-f02c-4721-bee0-7b7e5d277c42", + "id": "b3833b45-b18b-4aaf-8aa5-064caf7a3e6e", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "d2fb7606-9d27-4a1c-9701-93d807e02796", + "id": "a515f94f-c3f9-4bbf-9f17-277fa06ab1b3", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "2cd58196-a907-4c21-9753-75a6090f4f1b", + "id": "fe0a71cc-64eb-4f69-817b-0a98782749b6", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "211fab6f-e9f0-4436-a3a0-351b3bf11eb2", + "id": "c26c982a-7879-4324-9095-229913ee1370", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "2943ce9b-545f-489a-bee6-d3553312fd4c", + "id": "c3e57918-f00a-4e6d-9182-f4a86e2f2598", "key": "last_name", "value": "Moogle", "type": "string" + }, + { + "id": "56657131-867e-430d-a7cf-ec2bbb4ce14a", + "key": "mfg_id", + "value": "1435", + "type": "string" + }, + { + "id": "7c6a8217-98e5-4ea1-a3ad-608345e9895c", + "key": "make_id", + "value": "22043", + "type": "string" + }, + { + "id": "971f7ee1-d1b3-43da-afce-f32a1344b59f", + "key": "name", + "value": "Beetle 1.2 TSI MT (Gas)", + "type": "string" + }, + { + "id": "9f1d9e61-1142-45a3-837a-d0c67d6d7731", + "key": "plate_num", + "value": "MGL1234", + "type": "string" + }, + { + "id": "9d01f14b-8a98-41a2-9c50-bb74988219c5", + "key": "model_year", + "value": "2016", + "type": "string" + }, + { + "id": "f0d9c73d-a485-47da-9f55-5ab8e6ec67b8", + "key": "color", + "value": "White", + "type": "string" + }, + { + "id": "2734e723-5e3e-493b-b2ac-baf324ee6c56", + "key": "condition", + "value": "Brand New", + "type": "string" + }, + { + "id": "43d61623-17d2-4502-b225-74b40af420c0", + "key": "fuel_type", + "value": "Gas", + "type": "string" + }, + { + "id": "85fb5ff9-e4b8-4400-9093-54f4258a6780", + "key": "wty_code", + "value": "MKUP0123456", + "type": "string" + }, + { + "id": "34611113-838e-4e43-9964-d69cb3d900aa", + "key": "wty_expire", + "value": "20201125", + "type": "string" } ] } \ No newline at end of file diff --git a/postman/resq_test_20190717.sql b/postman/resq_test.sql similarity index 95% rename from postman/resq_test_20190717.sql rename to postman/resq_test.sql index 19dbfb8f..7060fdfa 100644 --- a/postman/resq_test_20190717.sql +++ b/postman/resq_test.sql @@ -134,6 +134,7 @@ CREATE TABLE `battery` ( LOCK TABLES `battery` WRITE; /*!40000 ALTER TABLE `battery` DISABLE KEYS */; +INSERT INTO `battery` VALUES (1033,1,438,1171,'NS40',21,6,0,0,0,0,0,4950.00,'','WMGB20DB-CPN00-LX',12),(1034,1,438,1172,'NS40R',21,6,0,0,0,0,0,4950.00,'','WMGB20DB-CPN00-LX',12),(1035,1,438,1173,'',21,6,0,0,0,0,0,4950.00,NULL,'WMGB20DB-CPN00-LX',12),(1036,1,438,1174,'NS60',21,6,0,0,0,0,0,5650.00,'','WMGB24DB-CPN00-LX',12),(1037,1,438,1175,'NS60',21,6,0,0,0,0,0,5650.00,'','WMGB24DB-CPN00-LX',12),(1038,1,438,1176,'1SM ',21,6,0,0,0,0,0,5800.00,'','WMGL23DL-CPN00-LX',12),(1039,1,438,1177,'1SM',21,6,0,0,0,0,0,5800.00,'','WMGL23DL-CPN00-LX',12),(1040,1,438,1178,'2SM',21,6,0,0,0,0,0,6300.00,'','WMGL26DL-CPN00-LX',12),(1041,1,438,1179,'2SMR',21,6,0,0,0,0,0,6300.00,'','WMGL26DL-CPN00-LX',12),(1042,1,438,1180,'3SM',21,6,0,0,0,0,0,7500.00,'','WMGL31DL-CPN00-LX',12),(1043,1,438,1181,'3SM ',21,6,0,0,0,0,0,7500.00,'','WMGL31DL-CPN00-LX',12),(1044,1,438,1182,'D20',21,6,0,0,0,0,0,5750.00,'','WMGD204L-TSP00-L',12),(1045,1,438,1183,'DIN44',21,6,0,0,0,0,0,6250.00,'','WMGN44DL-CPN00-L ',12),(1046,1,438,1184,'DIN55',21,6,0,0,0,0,0,7350.00,'','WMGN55DL-CPN00-L',12),(1047,1,438,1185,' ',21,6,0,0,0,0,0,7350.00,'','WMGN55DL-CPN00-L',12),(1048,1,438,1186,'DIN66',21,6,0,0,0,0,0,9150.00,'','WMGN66DL-CPN00-L',12),(1049,1,438,1187,'DIN66R',21,6,0,0,0,0,0,9150.00,'','WMGN66DL-CPN00-L',12),(1050,1,438,1188,'DIN77 H',21,6,0,0,0,0,0,9350.00,'','WMGG94DL-TSP00-L',12),(1051,1,438,1189,'DIN88',21,6,0,0,0,0,0,9800.00,'','WMGN88DL-CPN00-L',12),(1052,1,438,1190,'DIN100',21,6,0,0,0,0,0,12250.00,'','',12),(1053,1,438,1191,'DIN110',21,6,0,0,0,0,0,12250.00,'','WMGG94DL-TSP00-L',12),(1054,1,438,1192,'G34',21,6,0,0,0,0,0,9850.00,'','WMGD78DD-CPP00-L',12),(1055,1,438,1193,'G65',21,6,0,0,0,0,0,10000.00,'','WMGG65DE-CPP00-L',12),(1056,1,439,1175,'',24,8,0,0,0,0,0,6100.00,NULL,'WMXB24EB-CPN00-LX',0),(1057,1,439,1174,'NS60',24,8,0,0,0,0,0,6100.00,'','WMXB24EB-CPN00-LX',0),(1058,1,439,1194,'1SM',24,8,0,0,0,0,0,6350.00,'','WMXL23EL-CPN00-LX',0),(1059,1,439,1195,'2SM EXCEL',24,8,0,0,0,0,0,6700.00,'','WMXX26EL-CPN00-LX',0),(1060,1,439,1180,'X',24,8,0,0,0,0,0,8200.00,'','WMXX31EL-CPN00-LX',0),(1061,1,440,1183,'',15,6,0,0,0,0,0,5000.00,NULL,'WMEN44CL-CPN00-LX',0),(1062,1,440,1197,'',15,6,0,0,0,0,0,4000.00,NULL,'WMEB20CB-CPN00-LX',0),(1063,1,440,1174,' ',15,6,0,0,0,0,0,4550.00,'','WMEB24CB-CPN00-LX',0),(1064,1,440,1175,'',15,6,0,0,0,0,0,4550.00,NULL,'WMEB24CB-CPN00-LX',0),(1065,1,440,1194,' ',15,6,0,0,0,0,0,5050.00,'','WMEL23CL-CPN00-LX',0),(1066,1,440,1195,'',15,6,0,0,0,0,0,5100.00,NULL,'WMEL26CL-CPN00-LX',0),(1067,1,440,1196,'',15,6,0,0,0,0,0,6200.00,NULL,'WMEL31CL-CPN00-LX',0),(1068,1,438,1174,'01mogol',1,1,110,10,10,10,10,1100.00,'','test',12); /*!40000 ALTER TABLE `battery` ENABLE KEYS */; UNLOCK TABLES; @@ -157,6 +158,7 @@ CREATE TABLE `battery_manufacturer` ( LOCK TABLES `battery_manufacturer` WRITE; /*!40000 ALTER TABLE `battery_manufacturer` DISABLE KEYS */; +INSERT INTO `battery_manufacturer` VALUES (1,'Motolite'); /*!40000 ALTER TABLE `battery_manufacturer` ENABLE KEYS */; UNLOCK TABLES; @@ -180,6 +182,7 @@ CREATE TABLE `battery_model` ( LOCK TABLES `battery_model` WRITE; /*!40000 ALTER TABLE `battery_model` DISABLE KEYS */; +INSERT INTO `battery_model` VALUES (438,'GOLD'),(439,'EXCEL'),(440,'ENDURO'); /*!40000 ALTER TABLE `battery_model` ENABLE KEYS */; UNLOCK TABLES; @@ -206,6 +209,7 @@ CREATE TABLE `battery_size` ( LOCK TABLES `battery_size` WRITE; /*!40000 ALTER TABLE `battery_size` DISABLE KEYS */; +INSERT INTO `battery_size` VALUES (1171,'B20 / NS40',288.00,320.00,272.00),(1172,'B20 / NS40 / R',288.00,320.00,272.00),(1173,'B20 / NS40 / R B21 (Ledge)',288.00,320.00,272.00),(1174,'B24 / NS60 ',346.00,384.00,327.00),(1175,'B24 / NS60 / R',346.00,384.00,327.00),(1176,'1SM / D23 /NS50 ',374.00,416.00,354.00),(1177,'1SM / D23 /NS50 / R',374.00,416.00,354.00),(1178,'2SM / D26 /N50 ',449.00,499.00,425.00),(1179,'2SM / D26 /N50 / R',449.00,499.00,425.00),(1180,'3SM / D31 / N70 ',547.00,608.00,517.00),(1181,'3SM / D31 / N70 / R',547.00,608.00,517.00),(1182,'D20',449.00,499.00,425.00),(1183,'DIN44',346.00,384.00,327.00),(1184,'DIN55 ',374.00,416.00,354.00),(1185,'DIN55 / R',374.00,416.00,354.00),(1186,'DIN66 ',432.00,480.00,408.00),(1187,'DIN66 / R',432.00,480.00,408.00),(1188,'DIN77',432.00,480.00,408.00),(1189,'DIN88',576.00,640.00,544.00),(1190,'DIN100',576.00,640.00,544.00),(1191,'DIN110',576.00,640.00,544.00),(1192,'G34',518.00,576.00,490.00),(1193,'G65',490.00,544.00,463.00),(1194,'1SM / D23 / NS50',374.00,416.00,354.00),(1195,'2SM / D26 / N50',449.00,499.00,425.00),(1196,'3SM / N70 / D31',547.00,608.00,517.00),(1197,'NS40 / B20',288.00,320.00,272.00); /*!40000 ALTER TABLE `battery_size` ENABLE KEYS */; UNLOCK TABLES; @@ -834,6 +838,7 @@ CREATE TABLE `promo` ( LOCK TABLES `promo` WRITE; /*!40000 ALTER TABLE `promo` DISABLE KEYS */; +INSERT INTO `promo` VALUES (1,'Employee Discount','EMPLOY',0.4000000000,'opl'),(2,'Grab Discount','GRAB',0.2000000000,'srp'),(3,'Non-Battery Group','NBGROUP',0.0500000000,'srp'),(4,'Petron Fleet Card','PFLEET',0.1000000000,'srp'),(5,'Petron Value Card','PVALUE',0.1000000000,'srp'),(6,'Privilege Discount','PRIV',0.0500000000,'srp'),(7,'Shell Employee Card Holder','SHEMP',0.1000000000,'srp'),(8,'Shell Fleet Card Holder','SHFLEET',0.1000000000,'srp'),(9,'Special Discount','SPDISC',0.1000000000,'srp'); /*!40000 ALTER TABLE `promo` ENABLE KEYS */; UNLOCK TABLES; -- 2.43.5 From ad5cc72dbd21e71ee627df51e919cb2e1bcb73fe Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 22 Jul 2019 07:59:20 +0000 Subject: [PATCH 05/13] Add call to get list of promos, sorted by name in ascending order. #229 --- src/Controller/APIController.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Controller/APIController.php b/src/Controller/APIController.php index 6d5e295a..bfa5d5eb 100644 --- a/src/Controller/APIController.php +++ b/src/Controller/APIController.php @@ -717,6 +717,28 @@ class APIController extends Controller if ($res->isError()) return $res->getReturnResponse(); + // get promos + $promos = $em->getRepository(Promo::class)->findBy([], ['name' => 'asc']); + + error_log("mogol " . count($promos)); + + $promo_list = []; + foreach($promos as $promo) + { + $promo_list[] = [ + 'id' => $promo->getID(), + 'name' => $promo->getName(), + 'code' => $promo->getCode(), + 'discount_rate' => $promo->getDiscountRate(), + 'discount_apply'=> $promo->getDiscountApply(), + ]; + } + + $data = [ + 'promos' => $promo_list + ]; + $res->setData($data); + return $res->getReturnResponse(); } -- 2.43.5 From 4971ce61ef4f9d072854f19d35fc4306f7e05eb4 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 22 Jul 2019 09:23:41 +0000 Subject: [PATCH 06/13] Remove error_log statement. Add test for list promos and get compatible batteries. Add test data for compatible batteries. #229 --- ...I - API Controller.postman_collection.json | 100 ++++++++++++++---- src/Controller/APIController.php | 6 +- 2 files changed, 82 insertions(+), 24 deletions(-) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index 475612ce..df7c89e4 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -667,7 +667,8 @@ "pm.test(\"List promos\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.error.status).to.eql(\"success\");", - " //pm.expect(jsonData.data.makes).to.have.lengthOf(9);", + " pm.expect(jsonData.data.promos).to.have.lengthOf(9);", + " pm.expect(jsonData.data.promos[0].code).to.eql(\"EMPLOY\");", "});" ], "type": "text/javascript" @@ -711,7 +712,8 @@ "pm.test(\"Get compatible batteries\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.error.status).to.eql(\"success\");", - " ", + " pm.expect(jsonData.data.batteries[0].model_name).to.eql(\"GOLD\");", + " pm.expect(jsonData.data.batteries[0].size_name).to.eql(\"DIN55\");", "});" ], "type": "text/javascript" @@ -741,6 +743,64 @@ } }, "response": [] + }, + { + "name": "[Normal] Request Job Order", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "service_type", + "value": "", + "type": "text" + }, + { + "key": "cv_id", + "value": "{{cv_id}}", + "type": "text" + }, + { + "key": "trade_in", + "value": "", + "type": "text" + }, + { + "key": "long", + "value": "", + "type": "text" + }, + { + "key": "lat", + "value": "", + "type": "text" + }, + { + "key": "warranty", + "value": "", + "type": "text" + }, + { + "key": "mode_of_payment", + "value": "", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/job_order", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "job_order" + ] + } + }, + "response": [] } ], "event": [ @@ -767,109 +827,109 @@ ], "variable": [ { - "id": "b92a8775-f072-45d6-ba3c-c5c1e697026b", + "id": "ccac43fa-6d1e-49f2-b045-3e80c6d3934f", "key": "resq_url", "value": "resq.local", "type": "string" }, { - "id": "279d5bec-f9d3-431c-8ef7-8bce23f18f0f", + "id": "acc8f492-7460-41b4-911c-d12826ef2017", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "a747bcd5-9367-4394-97b1-c3caca435f8d", + "id": "43440cfe-0330-4254-a1e0-be0e7f054e1d", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "b3833b45-b18b-4aaf-8aa5-064caf7a3e6e", + "id": "8b0e4ffb-a6d0-45fd-bae0-2869b3a9a417", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "a515f94f-c3f9-4bbf-9f17-277fa06ab1b3", + "id": "4a6ebdda-c7b6-4f15-8b85-2afbfd7cab7d", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "fe0a71cc-64eb-4f69-817b-0a98782749b6", + "id": "6ce89a29-4591-41da-b4f0-2945c9ca1f2d", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "c26c982a-7879-4324-9095-229913ee1370", + "id": "d0c15f43-5b04-47f4-b26f-9b05e7c58c64", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "c3e57918-f00a-4e6d-9182-f4a86e2f2598", + "id": "3d44e913-b45d-4aaf-9c52-a13e8284a26a", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "56657131-867e-430d-a7cf-ec2bbb4ce14a", + "id": "c1a8a58a-e36c-4008-b3cb-be03e2c875fe", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "7c6a8217-98e5-4ea1-a3ad-608345e9895c", + "id": "3e6a8c18-a095-4a9d-a230-fda30e649801", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "971f7ee1-d1b3-43da-afce-f32a1344b59f", + "id": "ab6c0e13-73e7-4191-94da-178569ed080c", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "9f1d9e61-1142-45a3-837a-d0c67d6d7731", + "id": "9bd4e6b2-f45e-4e25-a4fa-73c69475d2a1", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "9d01f14b-8a98-41a2-9c50-bb74988219c5", + "id": "aeb30eac-85c6-42c9-940a-dfa07b17484a", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "f0d9c73d-a485-47da-9f55-5ab8e6ec67b8", + "id": "e58b31b5-f3ca-4d1d-bc4f-272904013a9f", "key": "color", "value": "White", "type": "string" }, { - "id": "2734e723-5e3e-493b-b2ac-baf324ee6c56", + "id": "adaaae50-3591-4fb6-b9d0-d92b4b40dda2", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "43d61623-17d2-4502-b225-74b40af420c0", + "id": "23d8e583-0b00-4644-98f4-c9ce3307d312", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "85fb5ff9-e4b8-4400-9093-54f4258a6780", + "id": "0a9ab79f-75f3-46c2-829d-bb437f656cd5", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "34611113-838e-4e43-9964-d69cb3d900aa", + "id": "167fbcaa-0dd1-4b34-aff7-df5c009d8b06", "key": "wty_expire", "value": "20201125", "type": "string" diff --git a/src/Controller/APIController.php b/src/Controller/APIController.php index bfa5d5eb..73b40583 100644 --- a/src/Controller/APIController.php +++ b/src/Controller/APIController.php @@ -720,8 +720,6 @@ class APIController extends Controller // get promos $promos = $em->getRepository(Promo::class)->findBy([], ['name' => 'asc']); - error_log("mogol " . count($promos)); - $promo_list = []; foreach($promos as $promo) { @@ -771,9 +769,9 @@ class APIController extends Controller 'mfg_id' => $batt->getManufacturer()->getID(), 'mfg_name' => $batt->getManufacturer()->getName(), 'model_id' => $batt->getModel()->getID(), - 'model_name' => $batt->getModel()->getName(), + 'model_name' => trim($batt->getModel()->getName()), 'size_id' => $batt->getSize()->getID(), - 'size_name' => $batt->getSize()->getName(), + 'size_name' => trim($batt->getSize()->getName()), 'price' => $batt->getSellingPrice(), 'wty_private' => $batt->getWarrantyPrivate(), 'wty_commercial' => $batt->getWarrantyCommercial(), -- 2.43.5 From dd7cd1973a9078f36979b0c14c17f04e0cd40469 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 31 Jul 2019 07:03:46 +0000 Subject: [PATCH 07/13] Update the sql script with latest db schema. #229 --- postman/resq_test.sql | 74 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 11 deletions(-) diff --git a/postman/resq_test.sql b/postman/resq_test.sql index 7060fdfa..a9a25519 100644 --- a/postman/resq_test.sql +++ b/postman/resq_test.sql @@ -106,18 +106,18 @@ CREATE TABLE `battery` ( `manufacturer_id` int(11) DEFAULT NULL, `model_id` int(11) DEFAULT NULL, `size_id` int(11) DEFAULT NULL, - `prod_code` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, - `sap_code` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `prod_code` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `warr_private` smallint(6) NOT NULL, `warr_commercial` smallint(6) NOT NULL, - `warr_tnv` smallint(6) NOT NULL, `res_capacity` smallint(6) NOT NULL, `length` smallint(6) NOT NULL, `width` smallint(6) NOT NULL, `height` smallint(6) NOT NULL, `total_height` smallint(6) NOT NULL, `sell_price` decimal(7,2) DEFAULT NULL, - `image_file` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `image_file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `sap_code` varchar(80) COLLATE utf8_unicode_ci NOT NULL, + `warr_tnv` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `IDX_D02EF4AEA23B42D` (`manufacturer_id`), KEY `IDX_D02EF4AE7975B7E7` (`model_id`), @@ -125,7 +125,7 @@ CREATE TABLE `battery` ( CONSTRAINT `FK_D02EF4AE498DA827` FOREIGN KEY (`size_id`) REFERENCES `battery_size` (`id`), CONSTRAINT `FK_D02EF4AE7975B7E7` FOREIGN KEY (`model_id`) REFERENCES `battery_model` (`id`), CONSTRAINT `FK_D02EF4AEA23B42D` FOREIGN KEY (`manufacturer_id`) REFERENCES `battery_manufacturer` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1070 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -149,7 +149,7 @@ CREATE TABLE `battery_manufacturer` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -173,7 +173,7 @@ CREATE TABLE `battery_model` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=441 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -200,7 +200,7 @@ CREATE TABLE `battery_size` ( `tip_premium` decimal(7,2) NOT NULL, `tip_other` decimal(7,2) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1198 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -237,6 +237,7 @@ CREATE TABLE `battery_vehicle` ( LOCK TABLES `battery_vehicle` WRITE; /*!40000 ALTER TABLE `battery_vehicle` DISABLE KEYS */; +INSERT INTO `battery_vehicle` VALUES (1033,21258),(1033,21287),(1033,21320),(1033,21321),(1033,21334),(1033,21486),(1033,21487),(1033,21488),(1033,21489),(1033,21490),(1033,21491),(1033,21492),(1033,21493),(1033,21494),(1033,21495),(1033,21496),(1033,21497),(1033,21498),(1033,21559),(1033,21560),(1033,21561),(1033,21562),(1033,21563),(1033,21564),(1033,21641),(1033,21642),(1033,21643),(1033,21703),(1033,21871),(1033,21927),(1033,21928),(1033,21929),(1033,21930),(1033,21931),(1033,21932),(1033,21946),(1033,21996),(1033,21997),(1033,21998),(1033,21999),(1033,22000),(1033,22001),(1033,22195),(1033,22196),(1034,21558),(1034,21925),(1034,21926),(1034,21930),(1034,22167),(1034,22228),(1036,21394),(1036,21395),(1036,21396),(1036,21469),(1036,21472),(1036,21473),(1036,21474),(1036,21475),(1036,21499),(1036,21500),(1036,21501),(1036,21502),(1036,21503),(1036,21504),(1036,21505),(1036,21506),(1036,21507),(1036,21508),(1036,21509),(1036,21510),(1036,21511),(1036,21565),(1036,21704),(1036,21705),(1036,21706),(1036,21789),(1036,21790),(1036,21791),(1036,21792),(1036,21872),(1036,21873),(1036,21874),(1036,21875),(1036,21876),(1036,21877),(1036,21878),(1036,21879),(1036,21880),(1036,21881),(1036,21882),(1036,21933),(1036,21934),(1036,21935),(1036,21936),(1036,21937),(1036,21938),(1036,21939),(1036,22002),(1036,22003),(1036,22004),(1036,22005),(1036,22006),(1036,22007),(1036,22008),(1036,22009),(1036,22010),(1036,22011),(1036,22012),(1036,22013),(1036,22014),(1036,22191),(1036,22193),(1036,22194),(1036,22197),(1036,22198),(1036,22201),(1037,21512),(1037,21513),(1037,22008),(1037,22016),(1037,22017),(1038,21254),(1038,21312),(1038,21313),(1038,21328),(1038,21414),(1038,21416),(1038,21462),(1038,21463),(1038,21464),(1038,21470),(1038,21471),(1038,21477),(1038,21480),(1038,21515),(1038,21516),(1038,21517),(1038,21518),(1038,21519),(1038,21520),(1038,21521),(1038,21522),(1038,21573),(1038,21616),(1038,21617),(1038,21618),(1038,21619),(1038,21620),(1038,21622),(1038,21623),(1038,21678),(1038,21679),(1038,21680),(1038,21681),(1038,21682),(1038,21683),(1038,21684),(1038,21685),(1038,21686),(1038,21735),(1038,21736),(1038,21737),(1038,21738),(1038,21739),(1038,21740),(1038,21741),(1038,21742),(1038,21743),(1038,21744),(1038,21745),(1038,21746),(1038,21747),(1038,21748),(1038,21749),(1038,21750),(1038,21751),(1038,21752),(1038,21753),(1038,21795),(1038,21796),(1038,21797),(1038,21798),(1038,21799),(1038,21800),(1038,21801),(1038,21802),(1038,21803),(1038,21804),(1038,21805),(1038,21811),(1038,21812),(1038,21813),(1038,21814),(1038,21815),(1038,21816),(1038,21817),(1038,21818),(1038,21819),(1038,21820),(1038,21821),(1038,21822),(1038,21823),(1038,21824),(1038,21825),(1038,21826),(1038,21827),(1038,21883),(1038,21901),(1038,21902),(1038,21911),(1038,21912),(1038,21913),(1038,21914),(1038,21922),(1038,21923),(1038,21952),(1038,21953),(1038,21954),(1038,21955),(1038,21956),(1038,21960),(1038,21961),(1038,21962),(1038,22174),(1038,22185),(1038,22199),(1038,22200),(1038,22202),(1039,21255),(1039,21330),(1039,21331),(1039,21332),(1039,21351),(1039,21355),(1039,21465),(1039,22225),(1040,21256),(1040,21257),(1040,21288),(1040,21314),(1040,21315),(1040,21316),(1040,21317),(1040,21319),(1040,21374),(1040,21375),(1040,21376),(1040,21387),(1040,21417),(1040,21418),(1040,21481),(1040,21483),(1040,21484),(1040,21485),(1040,21517),(1040,21518),(1040,21524),(1040,21525),(1040,21526),(1040,21527),(1040,21528),(1040,21529),(1040,21530),(1040,21531),(1040,21540),(1040,21571),(1040,21577),(1040,21583),(1040,21584),(1040,21586),(1040,21587),(1040,21588),(1040,21589),(1040,21591),(1040,21593),(1040,21624),(1040,21625),(1040,21653),(1040,21654),(1040,21655),(1040,21660),(1040,21662),(1040,21663),(1040,21665),(1040,21667),(1040,21668),(1040,21671),(1040,21676),(1040,21688),(1040,21689),(1040,21690),(1040,21691),(1040,21692),(1040,21694),(1040,21754),(1040,21755),(1040,21756),(1040,21757),(1040,21758),(1040,21759),(1040,21760),(1040,21772),(1040,21792),(1040,21828),(1040,21829),(1040,21830),(1040,21831),(1040,21832),(1040,21833),(1040,21834),(1040,21835),(1040,21836),(1040,21837),(1040,21838),(1040,21841),(1040,21862),(1040,21910),(1040,21917),(1040,21924),(1040,21955),(1040,21963),(1040,21964),(1040,21965),(1040,21966),(1040,21967),(1040,21968),(1040,21969),(1040,21970),(1040,21973),(1040,21974),(1040,21975),(1040,21984),(1040,21992),(1040,22190),(1040,22219),(1040,22226),(1041,21289),(1041,21318),(1041,21613),(1041,21614),(1041,21944),(1041,21978),(1041,21979),(1041,22229),(1042,21286),(1042,21375),(1042,21451),(1042,21452),(1042,21453),(1042,21454),(1042,21456),(1042,21461),(1042,21467),(1042,21476),(1042,21533),(1042,21540),(1042,21544),(1042,21545),(1042,21546),(1042,21547),(1042,21592),(1042,21594),(1042,21599),(1042,21604),(1042,21639),(1042,21640),(1042,21679),(1042,21695),(1042,21698),(1042,21699),(1042,21700),(1042,21701),(1042,21707),(1042,21711),(1042,21762),(1042,21767),(1042,21776),(1042,21777),(1042,21778),(1042,21779),(1042,21780),(1042,21781),(1042,21782),(1042,21783),(1042,21784),(1042,21785),(1042,21786),(1042,21854),(1042,21857),(1042,21858),(1042,21859),(1042,21860),(1042,21861),(1042,21862),(1042,21863),(1042,21864),(1042,21865),(1042,21866),(1042,21867),(1042,21869),(1042,21870),(1042,21904),(1042,21905),(1042,21906),(1042,21909),(1042,21978),(1042,21985),(1042,21986),(1042,21987),(1042,21988),(1042,21989),(1042,21990),(1042,21991),(1042,21992),(1042,22020),(1042,22023),(1042,22097),(1042,22178),(1042,22232),(1043,21419),(1043,21420),(1043,21421),(1043,21422),(1043,21455),(1043,21456),(1043,21457),(1043,21458),(1043,21459),(1043,21460),(1043,21461),(1043,21468),(1043,21548),(1043,21549),(1043,21550),(1043,21551),(1043,21552),(1043,21553),(1043,21554),(1043,21555),(1043,21556),(1043,21557),(1043,21600),(1043,21601),(1043,21602),(1043,21603),(1043,21672),(1043,21702),(1043,21787),(1043,21788),(1043,21866),(1043,21867),(1043,21868),(1043,21869),(1043,21870),(1043,21893),(1043,21904),(1043,21905),(1043,21906),(1043,21907),(1043,21908),(1043,21909),(1043,21945),(1043,21992),(1043,21993),(1043,21994),(1043,21995),(1043,22192),(1044,21566),(1044,21567),(1044,21568),(1044,21569),(1044,21644),(1044,21645),(1044,21646),(1045,21322),(1045,21323),(1045,21335),(1045,21336),(1045,21345),(1045,21425),(1045,21426),(1045,21427),(1045,21428),(1045,21429),(1045,21430),(1045,21431),(1045,21432),(1045,21571),(1045,21572),(1045,21888),(1045,21890),(1045,21891),(1045,21910),(1045,21947),(1045,21948),(1045,21949),(1045,21950),(1045,22027),(1045,22028),(1045,22029),(1045,22098),(1046,21259),(1046,21276),(1046,21277),(1046,21278),(1046,21279),(1046,21280),(1046,21281),(1046,21283),(1046,21284),(1046,21285),(1046,21290),(1046,21291),(1046,21293),(1046,21297),(1046,21306),(1046,21324),(1046,21325),(1046,21326),(1046,21337),(1046,21338),(1046,21340),(1046,21341),(1046,21342),(1046,21343),(1046,21344),(1046,21346),(1046,21352),(1046,21353),(1046,21354),(1046,21358),(1046,21360),(1046,21389),(1046,21390),(1046,21391),(1046,21392),(1046,21393),(1046,21418),(1046,21433),(1046,21441),(1046,21443),(1046,21573),(1046,21574),(1046,21575),(1046,21734),(1046,21888),(1046,21889),(1046,21890),(1046,21891),(1046,21942),(1046,21949),(1046,21950),(1046,22018),(1046,22029),(1046,22030),(1046,22031),(1046,22032),(1046,22033),(1046,22034),(1046,22035),(1046,22036),(1046,22037),(1046,22038),(1046,22039),(1046,22040),(1046,22041),(1046,22042),(1046,22043),(1046,22044),(1046,22058),(1046,22059),(1046,22060),(1046,22061),(1046,22107),(1046,22148),(1046,22149),(1046,22150),(1046,22175),(1046,22179),(1046,22214),(1046,22215),(1046,22241),(1047,21346),(1047,21347),(1047,21348),(1047,21349),(1047,21350),(1047,21352),(1047,21353),(1047,21354),(1047,21434),(1047,21951),(1048,21260),(1048,21261),(1048,21262),(1048,21263),(1048,21264),(1048,21265),(1048,21267),(1048,21279),(1048,21282),(1048,21283),(1048,21284),(1048,21285),(1048,21290),(1048,21292),(1048,21293),(1048,21294),(1048,21296),(1048,21303),(1048,21304),(1048,21306),(1048,21307),(1048,21308),(1048,21309),(1048,21310),(1048,21311),(1048,21327),(1048,21329),(1048,21333),(1048,21356),(1048,21357),(1048,21358),(1048,21359),(1048,21360),(1048,21361),(1048,21362),(1048,21363),(1048,21380),(1048,21381),(1048,21383),(1048,21397),(1048,21435),(1048,21436),(1048,21437),(1048,21438),(1048,21439),(1048,21440),(1048,21441),(1048,21442),(1048,21443),(1048,21576),(1048,21577),(1048,21578),(1048,21707),(1048,21728),(1048,21729),(1048,21730),(1048,21731),(1048,21732),(1048,21885),(1048,21886),(1048,21887),(1048,21889),(1048,21892),(1048,21898),(1048,21899),(1048,21900),(1048,22019),(1048,22020),(1048,22021),(1048,22022),(1048,22045),(1048,22046),(1048,22047),(1048,22048),(1048,22049),(1048,22050),(1048,22051),(1048,22062),(1048,22063),(1048,22064),(1048,22065),(1048,22153),(1048,22154),(1048,22155),(1048,22156),(1048,22157),(1048,22169),(1048,22172),(1048,22173),(1048,22177),(1048,22180),(1048,22204),(1048,22205),(1048,22206),(1048,22207),(1048,22208),(1048,22209),(1048,22210),(1048,22211),(1048,22212),(1048,22224),(1049,21347),(1049,21356),(1049,21364),(1049,21365),(1050,21270),(1050,21372),(1050,21421),(1050,21423),(1050,21424),(1050,21436),(1050,21615),(1050,21651),(1050,21652),(1050,21707),(1050,21708),(1050,21719),(1050,21897),(1050,22026),(1050,22103),(1050,22104),(1050,22105),(1050,22106),(1050,22117),(1050,22122),(1050,22154),(1050,22161),(1050,22189),(1050,22203),(1050,22218),(1050,22230),(1050,22231),(1051,21265),(1051,21267),(1051,21268),(1051,21270),(1051,21271),(1051,21272),(1051,21273),(1051,21274),(1051,21275),(1051,21281),(1051,21294),(1051,21295),(1051,21296),(1051,21297),(1051,21298),(1051,21299),(1051,21300),(1051,21301),(1051,21302),(1051,21303),(1051,21304),(1051,21305),(1051,21357),(1051,21367),(1051,21378),(1051,21379),(1051,21408),(1051,21409),(1051,21410),(1051,21411),(1051,21412),(1051,21413),(1051,21605),(1051,21606),(1051,21607),(1051,21608),(1051,21609),(1051,21610),(1051,21611),(1051,21612),(1051,21656),(1051,21657),(1051,21658),(1051,21674),(1051,21675),(1051,21676),(1051,21713),(1051,21714),(1051,21715),(1051,21716),(1051,21717),(1051,21718),(1051,21719),(1051,21720),(1051,21721),(1051,21722),(1051,21723),(1051,21724),(1051,21725),(1051,21726),(1051,21727),(1051,21733),(1051,21884),(1051,21894),(1051,21895),(1051,21896),(1051,21897),(1051,22024),(1051,22025),(1051,22053),(1051,22054),(1051,22055),(1051,22056),(1051,22057),(1051,22221),(1051,22222),(1053,21268),(1053,21271),(1053,21299),(1053,21300),(1053,21302),(1053,21306),(1053,21364),(1053,21365),(1053,21570),(1053,21605),(1053,21612),(1053,21647),(1053,21648),(1053,21649),(1053,21650),(1053,21655),(1053,21656),(1053,21657),(1053,21676),(1053,21718),(1053,22026),(1053,22138),(1053,22140),(1053,22141),(1053,22143),(1053,22144),(1054,21362),(1054,21366),(1054,21367),(1054,21368),(1054,21369),(1054,21370),(1054,21371),(1054,21382),(1054,21384),(1054,21385),(1054,21386),(1054,21398),(1054,21399),(1054,21400),(1054,21401),(1054,21402),(1054,21403),(1054,21404),(1054,21405),(1054,21466),(1054,21514),(1054,21615),(1054,21673),(1054,21793),(1054,22170),(1054,22240),(1055,21372),(1055,21373),(1055,21387),(1055,21388),(1055,21406),(1055,21407),(1055,21444),(1055,21445),(1055,21446),(1055,21447),(1055,21448),(1055,21449),(1055,21450),(1055,22219),(1056,21940),(1056,21941),(1056,22015),(1057,21336),(1057,21480),(1058,21253),(1058,21415),(1058,21417),(1058,21478),(1058,21479),(1058,21525),(1058,21580),(1058,21581),(1058,21582),(1058,21621),(1058,21677),(1058,21687),(1058,21794),(1058,21808),(1058,21915),(1058,21916),(1058,21917),(1058,21918),(1058,21919),(1058,21920),(1058,21957),(1058,21958),(1058,21959),(1058,21977),(1058,22052),(1058,22066),(1058,22099),(1058,22184),(1058,22225),(1059,21256),(1059,21257),(1059,21289),(1059,21333),(1059,21482),(1059,21485),(1059,21523),(1059,21585),(1059,21586),(1059,21587),(1059,21588),(1059,21589),(1059,21590),(1059,21626),(1059,21659),(1059,21660),(1059,21661),(1059,21664),(1059,21665),(1059,21666),(1059,21693),(1059,21694),(1059,21695),(1059,21696),(1059,21761),(1059,21762),(1059,21763),(1059,21764),(1059,21765),(1059,21828),(1059,21829),(1059,21830),(1059,21837),(1059,21839),(1059,21840),(1059,21841),(1059,21842),(1059,21903),(1059,21921),(1059,21943),(1059,21970),(1059,21971),(1059,21972),(1059,21976),(1059,21977),(1060,21377),(1060,21451),(1060,21454),(1060,21532),(1060,21533),(1060,21534),(1060,21535),(1060,21536),(1060,21537),(1060,21538),(1060,21539),(1060,21540),(1060,21541),(1060,21542),(1060,21543),(1060,21579),(1060,21592),(1060,21593),(1060,21594),(1060,21595),(1060,21596),(1060,21597),(1060,21598),(1060,21627),(1060,21628),(1060,21629),(1060,21630),(1060,21631),(1060,21632),(1060,21633),(1060,21634),(1060,21635),(1060,21636),(1060,21637),(1060,21638),(1060,21655),(1060,21667),(1060,21668),(1060,21669),(1060,21670),(1060,21671),(1060,21697),(1060,21709),(1060,21710),(1060,21711),(1060,21712),(1060,21766),(1060,21767),(1060,21768),(1060,21769),(1060,21770),(1060,21771),(1060,21772),(1060,21773),(1060,21774),(1060,21775),(1060,21843),(1060,21844),(1060,21845),(1060,21846),(1060,21847),(1060,21848),(1060,21849),(1060,21850),(1060,21851),(1060,21852),(1060,21853),(1060,21854),(1060,21855),(1060,21856),(1060,21980),(1060,21981),(1060,21982),(1060,21983),(1060,21984),(1060,22119); /*!40000 ALTER TABLE `battery_vehicle` ENABLE KEYS */; UNLOCK TABLES; @@ -265,10 +266,28 @@ CREATE TABLE `customer` ( `email` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, `priv_third_party` tinyint(1) NOT NULL, `priv_promo` tinyint(1) NOT NULL, - PRIMARY KEY (`id`) + `policy_mobile_app_id` int(11) DEFAULT NULL, + `policy_third_party_id` int(11) DEFAULT NULL, + `policy_promo_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `IDX_81398E09198AA9B6` (`policy_mobile_app_id`), + KEY `IDX_81398E09D3D39E2D` (`policy_third_party_id`), + KEY `IDX_81398E09F117A2F2` (`policy_promo_id`), + CONSTRAINT `FK_81398E09198AA9B6` FOREIGN KEY (`policy_mobile_app_id`) REFERENCES `privacy_policy` (`id`), + CONSTRAINT `FK_81398E09D3D39E2D` FOREIGN KEY (`policy_third_party_id`) REFERENCES `privacy_policy` (`id`), + CONSTRAINT `FK_81398E09F117A2F2` FOREIGN KEY (`policy_promo_id`) REFERENCES `privacy_policy` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Dumping data for table `customer` +-- + +LOCK TABLES `customer` WRITE; +/*!40000 ALTER TABLE `customer` DISABLE KEYS */; +/*!40000 ALTER TABLE `customer` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `customer_vehicle` -- @@ -302,6 +321,15 @@ CREATE TABLE `customer_vehicle` ( ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Dumping data for table `customer_vehicle` +-- + +LOCK TABLES `customer_vehicle` WRITE; +/*!40000 ALTER TABLE `customer_vehicle` DISABLE KEYS */; +/*!40000 ALTER TABLE `customer_vehicle` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `hub` -- @@ -814,6 +842,30 @@ LOCK TABLES `plate_number` WRITE; /*!40000 ALTER TABLE `plate_number` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `privacy_policy` +-- + +DROP TABLE IF EXISTS `privacy_policy`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `privacy_policy` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, + `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `privacy_policy` +-- + +LOCK TABLES `privacy_policy` WRITE; +/*!40000 ALTER TABLE `privacy_policy` DISABLE KEYS */; +/*!40000 ALTER TABLE `privacy_policy` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `promo` -- @@ -829,7 +881,7 @@ CREATE TABLE `promo` ( `discount_apply` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQ_B0139AFB77153098` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1387,4 +1439,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-07-17 9:47:48 +-- Dump completed on 2019-07-31 6:59:58 -- 2.43.5 From 18a9102b3a471a0b5b1068e3c2d407e3a2f383af Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 31 Jul 2019 08:07:55 +0000 Subject: [PATCH 08/13] Add test scripts request job order, get estimate, get ongoing job orders, and get rider status for APIController. #229 --- ...I - API Controller.postman_collection.json | 500 +++++++++++++++++- 1 file changed, 473 insertions(+), 27 deletions(-) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index df7c89e4..9f49efda 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -174,6 +174,59 @@ }, "response": [] }, + { + "name": "[Normal] Validate Code", + "event": [ + { + "listen": "test", + "script": { + "id": "11118347-c2fd-466d-800c-82714070afab", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Validate Code\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "code", + "value": "{{code}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/code_validate?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "code_validate" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, { "name": "[Normal] Get Status", "event": [ @@ -189,7 +242,7 @@ "pm.test(\"Status of mobile session\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.error.status).to.eql(\"success\");", - " pm.expect(jsonData.data.status).to.eql(\"unconfirmed\");", + " pm.expect(jsonData.data.status).to.eql(\"confirmed\");", "});" ], "type": "text/javascript" @@ -746,6 +799,28 @@ }, { "name": "[Normal] Request Job Order", + "event": [ + { + "listen": "test", + "script": { + "id": "004a6b74-d182-45c9-aaca-26eac31ef663", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Request job order\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.jo_id).to.eql(1);", + " pm.expect(jsonData.data.invoice.items[0].title).to.eql(\"GOLD DIN77\");", + " pm.expect(jsonData.data.invoice.items[0].qty).to.eql(1);", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], @@ -754,7 +829,7 @@ "formdata": [ { "key": "service_type", - "value": "", + "value": "{{service_type}}", "type": "text" }, { @@ -764,39 +839,337 @@ }, { "key": "trade_in", - "value": "", + "value": "{{trade_in}}", "type": "text" }, { "key": "long", - "value": "", + "value": "{{longitude}}", "type": "text" }, { "key": "lat", - "value": "", + "value": "{{latitude}}", "type": "text" }, { "key": "warranty", - "value": "", + "value": "{{warranty}}", "type": "text" }, { "key": "mode_of_payment", - "value": "", + "value": "{{mode_of_payment}}", + "type": "text" + }, + { + "key": "delivery_address", + "value": "{{delivery_address}}", + "type": "text" + }, + { + "key": "delivery_instructions", + "value": "{{delivery_instructions}}", + "type": "text" + }, + { + "key": "promo_id", + "value": "{{promo_id}}", + "type": "text" + }, + { + "key": "batt_id", + "value": "{{batt_id}}", "type": "text" } ] }, "url": { - "raw": "{{resq_url}}/api/job_order", + "raw": "{{resq_url}}/api/job_order?api_key={{api_key}}", "host": [ "{{resq_url}}" ], "path": [ "api", "job_order" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get Estimate", + "event": [ + { + "listen": "test", + "script": { + "id": "e1573c58-a141-4d97-8812-c1b50f261f32", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Your test name\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.total_price).to.eql(8014.29);", + " pm.expect(jsonData.data.items[0].title).to.eql(\"GOLD DIN77\");", + " pm.expect(jsonData.data.items[0].qty).to.eql(1);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "service_type", + "value": "{{service_type}}", + "type": "text" + }, + { + "key": "cv_id", + "value": "{{cv_id}}", + "type": "text" + }, + { + "key": "trade_in", + "value": "{{trade_in}}", + "type": "text" + }, + { + "key": "promo_id", + "value": "{{promo_id}}", + "type": "text" + }, + { + "key": "batt_id", + "value": "{{batt_id}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/estimate?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "estimate" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] GetOngoing Job Order", + "event": [ + { + "listen": "test", + "script": { + "id": "7a7496f9-8ec7-4912-9887-55fda6e7c1c3", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get ongoing job orders\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.has_ongoing).to.eql(true);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/job_order/ongoing?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "job_order", + "ongoing" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get Rider Status", + "event": [ + { + "listen": "test", + "script": { + "id": "f12508f6-cd9f-443b-ae56-835d4e913e55", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get rider status\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.service_type).to.eql(\"battery_new\");", + " pm.expect(jsonData.data.status).to.eql(\"outlet_assign\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/rider?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "rider" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Privacy Settings", + "event": [ + { + "listen": "test", + "script": { + "id": "080cb4ae-2e6a-4c41-a1a1-1f5993fb1703", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Privacy settings\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "priv_third_party", + "value": "true", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/privacy?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "privacy" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Activate Warranty", + "event": [ + { + "listen": "test", + "script": { + "id": "4644fedd-befd-4d63-bf49-118ae368e690", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "//pm.test(\"Activate warranty\", function () {", + "// var jsonData = pm.response.json();", + "// pm.expect(jsonData.error.status).to.eql(\"success\");", + "//});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "plate_number", + "value": "{{plate_num}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/activate_warranty?api_key={{api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "activate_warranty" + ], + "query": [ + { + "key": "api_key", + "value": "{{api_key}}" + } ] } }, @@ -827,112 +1200,185 @@ ], "variable": [ { - "id": "ccac43fa-6d1e-49f2-b045-3e80c6d3934f", + "id": "ea71567b-5072-4022-ae8c-7562c32175b0", "key": "resq_url", "value": "resq.local", - "type": "string" + "type": "string", + "disabled": true }, { - "id": "acc8f492-7460-41b4-911c-d12826ef2017", + "id": "ba3077c6-779c-433f-902d-32e9a7c559a8", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "43440cfe-0330-4254-a1e0-be0e7f054e1d", + "id": "9043af9b-f151-413e-94ea-b19c46354eac", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "8b0e4ffb-a6d0-45fd-bae0-2869b3a9a417", + "id": "a0b258b2-fdd2-479c-b916-7199abb2b2c1", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "4a6ebdda-c7b6-4f15-8b85-2afbfd7cab7d", + "id": "fe723a21-2354-4bcb-8e10-df741698509d", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "6ce89a29-4591-41da-b4f0-2945c9ca1f2d", + "id": "98b503d1-057c-497b-9257-9b9e6fbb3c2e", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "d0c15f43-5b04-47f4-b26f-9b05e7c58c64", + "id": "e972a8ab-5201-486f-a7af-21ce3782fe78", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "3d44e913-b45d-4aaf-9c52-a13e8284a26a", + "id": "a0d00c69-e031-47ed-8dfe-d948c5ad2188", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "c1a8a58a-e36c-4008-b3cb-be03e2c875fe", + "id": "01fa3dfd-8395-4f21-a883-9d5d75b5689c", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "3e6a8c18-a095-4a9d-a230-fda30e649801", + "id": "f4fdee45-3e31-46b7-9ca3-2b6f29827e9e", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "ab6c0e13-73e7-4191-94da-178569ed080c", + "id": "f9504219-f9bd-491a-926e-840a27962838", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "9bd4e6b2-f45e-4e25-a4fa-73c69475d2a1", + "id": "fc0514cd-871b-468e-9ab2-12942440ed91", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "aeb30eac-85c6-42c9-940a-dfa07b17484a", + "id": "34a9c77a-0d2e-4444-93e6-b67945900dd8", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "e58b31b5-f3ca-4d1d-bc4f-272904013a9f", + "id": "5eb2ca76-119c-4acc-8179-a958e6bc38a7", "key": "color", "value": "White", "type": "string" }, { - "id": "adaaae50-3591-4fb6-b9d0-d92b4b40dda2", + "id": "e9fabf98-8ac4-4670-a9f8-afde589d1910", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "23d8e583-0b00-4644-98f4-c9ce3307d312", + "id": "efd5911d-234a-42c8-9288-35b4f7e49d1c", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "0a9ab79f-75f3-46c2-829d-bb437f656cd5", + "id": "db9aede9-4365-4245-8d8c-2f917a306107", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "167fbcaa-0dd1-4b34-aff7-df5c009d8b06", + "id": "77ca86d0-da17-4c35-898b-ce44a4f7f7cb", "key": "wty_expire", "value": "20201125", "type": "string" + }, + { + "id": "14a33e08-f033-413a-910c-6c780a5f9718", + "key": "service_type", + "value": "battery_new", + "type": "string" + }, + { + "id": "85e49d9f-ac6e-4cc1-9584-8e3a635a39a6", + "key": "trade_in", + "value": "MOTOLITE", + "type": "string" + }, + { + "id": "b05d017c-3634-4066-ba3f-db0328089593", + "key": "longitude", + "value": "121.018039", + "type": "string" + }, + { + "id": "8ac1e199-a2be-4a0f-8f8c-0bf3fa3361c6", + "key": "latitude", + "value": "14.606807", + "type": "string" + }, + { + "id": "5d1c918b-1e3d-4f86-999d-58788721898a", + "key": "warranty", + "value": "private", + "type": "string" + }, + { + "id": "1b5c2a8d-476f-4b16-9130-2e07d50cdd5f", + "key": "mode_of_payment", + "value": "CASH", + "type": "string" + }, + { + "id": "0dd2f37c-0bb5-4568-8c54-5998bf4e0cbd", + "key": "delivery_address", + "value": "#123 Moogle Drive", + "type": "string" + }, + { + "id": "b263ffe8-fa79-43fd-83c9-49117846c257", + "key": "delivery_instructions", + "value": "Look for the red bon-bon", + "type": "string" + }, + { + "id": "158cee53-072b-4cce-80cb-d7d92cb9aec2", + "key": "promo_id", + "value": "1", + "type": "string" + }, + { + "id": "85ff573c-d513-48d7-b37a-2869d5a956a8", + "key": "code", + "value": "123456", + "type": "string" + }, + { + "id": "0dfcab3a-08d3-4a91-99dc-b565475e667b", + "key": "batt_id", + "value": "1050", + "type": "string" + }, + { + "id": "a80f34f5-0dde-43b2-afa9-eff05801a611", + "key": "cv_id", + "value": "2", + "type": "string" } ] } \ No newline at end of file -- 2.43.5 From 89c56aaf6be0db1046a9d97a02a9087f5295f44f Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Fri, 2 Aug 2019 09:25:37 +0000 Subject: [PATCH 09/13] Add test data to sql dump. Add tests to get rider status. Add global variable for customer vehicle id. #229 --- postman/PoC Resq.postman_environment.json | 6 +- ...I - API Controller.postman_collection.json | 127 ++++++++++++------ postman/resq_test.sql | 42 +++--- 3 files changed, 119 insertions(+), 56 deletions(-) diff --git a/postman/PoC Resq.postman_environment.json b/postman/PoC Resq.postman_environment.json index 8b275b29..08293935 100755 --- a/postman/PoC Resq.postman_environment.json +++ b/postman/PoC Resq.postman_environment.json @@ -4,7 +4,7 @@ "values": [ { "key": "resq_url", - "value": "resq.local", + "value": "http://resq.local", "enabled": true }, { @@ -14,6 +14,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2019-07-18T09:27:17.254Z", - "_postman_exported_using": "Postman/7.2.2" + "_postman_exported_at": "2019-08-02T09:22:01.877Z", + "_postman_exported_using": "Postman/7.3.5" } \ No newline at end of file diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index 9f49efda..e846d883 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -487,7 +487,7 @@ " ", " // store customer vehicle id for update vehicle", " let cv_id = jsonData.data.cv_id;", - " pm.globals.set(\"cv_id\", cv_id);", + " pm.globals.set(\"global_cv_id\", cv_id);", "});" ], "type": "text/javascript" @@ -571,7 +571,7 @@ "pm.test(\"Update vehicle\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.error.status).to.eql(\"success\");", - " pm.expect(jsonData.data.cv_id).to.eql(pm.globals.get(\"cv_id\"));", + " pm.expect(jsonData.data.cv_id).to.eql(pm.globals.get(\"global_cv_id\"));", "});" ], "type": "text/javascript" @@ -642,14 +642,14 @@ ] }, "url": { - "raw": "{{resq_url}}/api/vehicles/{{cv_id}}?api_key={{api_key}}", + "raw": "{{resq_url}}/api/vehicles/{{global_cv_id}}?api_key={{api_key}}", "host": [ "{{resq_url}}" ], "path": [ "api", "vehicles", - "{{cv_id}}" + "{{global_cv_id}}" ], "query": [ { @@ -812,7 +812,6 @@ "pm.test(\"Request job order\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.error.status).to.eql(\"success\");", - " pm.expect(jsonData.data.jo_id).to.eql(1);", " pm.expect(jsonData.data.invoice.items[0].title).to.eql(\"GOLD DIN77\");", " pm.expect(jsonData.data.invoice.items[0].qty).to.eql(1);", "});" @@ -834,7 +833,7 @@ }, { "key": "cv_id", - "value": "{{cv_id}}", + "value": "{{global_cv_id}}", "type": "text" }, { @@ -940,7 +939,7 @@ }, { "key": "cv_id", - "value": "{{cv_id}}", + "value": "{{global_cv_id}}", "type": "text" }, { @@ -1025,7 +1024,7 @@ "response": [] }, { - "name": "[Normal] Get Rider Status", + "name": "[Normal] Get Rider Status - Job Order Pending", "event": [ { "listen": "test", @@ -1069,6 +1068,51 @@ }, "response": [] }, + { + "name": "[Normal] Get Rider Status - Job Order Rider Assign", + "event": [ + { + "listen": "test", + "script": { + "id": "f12508f6-cd9f-443b-ae56-835d4e913e55", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get rider status\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.service_type).to.eql(\"battery_new\");", + " pm.expect(jsonData.data.status).to.eql(\"rider_assign\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/rider?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "rider" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, { "name": "[Normal] Privacy Settings", "event": [ @@ -1200,184 +1244,191 @@ ], "variable": [ { - "id": "ea71567b-5072-4022-ae8c-7562c32175b0", + "id": "167a69fc-9d8e-4686-9982-abfb54e85074", "key": "resq_url", "value": "resq.local", "type": "string", "disabled": true }, { - "id": "ba3077c6-779c-433f-902d-32e9a7c559a8", + "id": "68e04044-0232-49c0-bfd0-708b6ada2ac6", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "9043af9b-f151-413e-94ea-b19c46354eac", + "id": "8db9dac2-5e1c-4603-97f0-10d1eb1b4a81", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "a0b258b2-fdd2-479c-b916-7199abb2b2c1", + "id": "34a07c40-14e3-4fcc-abb5-0151bf753bb1", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "fe723a21-2354-4bcb-8e10-df741698509d", + "id": "b1571266-c924-43bc-baa6-1a689e1697a3", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "98b503d1-057c-497b-9257-9b9e6fbb3c2e", + "id": "4f3f1213-63ad-486e-a15b-d6e8feed0c45", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "e972a8ab-5201-486f-a7af-21ce3782fe78", + "id": "ef69687c-18b7-4685-9df6-e36d43129694", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "a0d00c69-e031-47ed-8dfe-d948c5ad2188", + "id": "e334a942-9c38-4b1e-ac27-6f202bc9e0a8", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "01fa3dfd-8395-4f21-a883-9d5d75b5689c", + "id": "16e39c37-0017-4bdb-a8ef-cbca36559674", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "f4fdee45-3e31-46b7-9ca3-2b6f29827e9e", + "id": "b3eebff1-510c-4f38-91f8-c28f0307cb5f", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "f9504219-f9bd-491a-926e-840a27962838", + "id": "9dba5a02-9235-4535-bc6f-33f42b6ca88e", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "fc0514cd-871b-468e-9ab2-12942440ed91", + "id": "516a73e2-02bd-4f1f-93d1-a4d2f90d5068", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "34a9c77a-0d2e-4444-93e6-b67945900dd8", + "id": "839c1326-0855-47d6-9cb1-82a46e510c3b", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "5eb2ca76-119c-4acc-8179-a958e6bc38a7", + "id": "cdcf76b4-4a55-4d1f-a9f1-1ec750123a49", "key": "color", "value": "White", "type": "string" }, { - "id": "e9fabf98-8ac4-4670-a9f8-afde589d1910", + "id": "93f2699d-36e5-4434-b161-a6106e4856c4", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "efd5911d-234a-42c8-9288-35b4f7e49d1c", + "id": "30b08c7f-44c8-4e1c-9d71-29b7429ce235", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "db9aede9-4365-4245-8d8c-2f917a306107", + "id": "13d5a51b-04bf-422c-bc15-e49d51b0db40", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "77ca86d0-da17-4c35-898b-ce44a4f7f7cb", + "id": "67b34475-18ec-4363-9191-52292c6ffade", "key": "wty_expire", "value": "20201125", "type": "string" }, { - "id": "14a33e08-f033-413a-910c-6c780a5f9718", + "id": "ee65965a-d81f-4f2f-9914-14d78c9a902f", "key": "service_type", "value": "battery_new", "type": "string" }, { - "id": "85e49d9f-ac6e-4cc1-9584-8e3a635a39a6", + "id": "c7d9df58-1734-479e-97cf-861aa531f6fe", "key": "trade_in", "value": "MOTOLITE", "type": "string" }, { - "id": "b05d017c-3634-4066-ba3f-db0328089593", + "id": "a3bac62f-397c-4675-b3bc-bd25db55df5b", "key": "longitude", "value": "121.018039", "type": "string" }, { - "id": "8ac1e199-a2be-4a0f-8f8c-0bf3fa3361c6", + "id": "b00513bc-65dd-4db5-95d4-2891553f8e77", "key": "latitude", "value": "14.606807", "type": "string" }, { - "id": "5d1c918b-1e3d-4f86-999d-58788721898a", + "id": "d1cdd86f-885c-44aa-9987-70e74df6bf73", "key": "warranty", "value": "private", "type": "string" }, { - "id": "1b5c2a8d-476f-4b16-9130-2e07d50cdd5f", + "id": "22479270-44c9-4169-acb0-40dbaec1a846", "key": "mode_of_payment", "value": "CASH", "type": "string" }, { - "id": "0dd2f37c-0bb5-4568-8c54-5998bf4e0cbd", + "id": "bc13ae82-5efa-4d2a-8791-a5811ea5bf3a", "key": "delivery_address", "value": "#123 Moogle Drive", "type": "string" }, { - "id": "b263ffe8-fa79-43fd-83c9-49117846c257", + "id": "dd62622c-c609-4cdc-bddb-aa45bb53400a", "key": "delivery_instructions", "value": "Look for the red bon-bon", "type": "string" }, { - "id": "158cee53-072b-4cce-80cb-d7d92cb9aec2", + "id": "fafac17b-707a-48c5-a8ba-c3780e8925bb", "key": "promo_id", "value": "1", "type": "string" }, { - "id": "85ff573c-d513-48d7-b37a-2869d5a956a8", + "id": "dfa0051a-e129-4e56-a424-3ef8f46a10d0", "key": "code", "value": "123456", "type": "string" }, { - "id": "0dfcab3a-08d3-4a91-99dc-b565475e667b", + "id": "cc83a9a4-c34b-4168-9493-225e7c93b1c8", "key": "batt_id", "value": "1050", "type": "string" }, { - "id": "a80f34f5-0dde-43b2-afa9-eff05801a611", + "id": "2ae16b4a-bef8-47dd-a584-b0450d82381d", "key": "cv_id", "value": "2", + "type": "string", + "disabled": true + }, + { + "id": "ec6d34f3-44bc-43ba-8c8c-16b76ea00353", + "key": "preset_api_key", + "value": "5d427428b1541", "type": "string" } ] diff --git a/postman/resq_test.sql b/postman/resq_test.sql index a9a25519..19a1377e 100644 --- a/postman/resq_test.sql +++ b/postman/resq_test.sql @@ -276,7 +276,7 @@ CREATE TABLE `customer` ( CONSTRAINT `FK_81398E09198AA9B6` FOREIGN KEY (`policy_mobile_app_id`) REFERENCES `privacy_policy` (`id`), CONSTRAINT `FK_81398E09D3D39E2D` FOREIGN KEY (`policy_third_party_id`) REFERENCES `privacy_policy` (`id`), CONSTRAINT `FK_81398E09F117A2F2` FOREIGN KEY (`policy_promo_id`) REFERENCES `privacy_policy` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -285,6 +285,7 @@ CREATE TABLE `customer` ( LOCK TABLES `customer` WRITE; /*!40000 ALTER TABLE `customer` DISABLE KEYS */; +INSERT INTO `customer` VALUES (2,'Mr','Moguri','Kupo','regular','','9221111112','','','',0,0,1,0,'moguri@test.com',0,0,NULL,NULL,NULL); /*!40000 ALTER TABLE `customer` ENABLE KEYS */; UNLOCK TABLES; @@ -318,7 +319,7 @@ CREATE TABLE `customer_vehicle` ( CONSTRAINT `FK_75D403819A19CFC` FOREIGN KEY (`battery_id`) REFERENCES `battery` (`id`), CONSTRAINT `FK_75D4038545317D1` FOREIGN KEY (`vehicle_id`) REFERENCES `vehicle` (`id`), CONSTRAINT `FK_75D40389395C3F3` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -327,6 +328,7 @@ CREATE TABLE `customer_vehicle` ( LOCK TABLES `customer_vehicle` WRITE; /*!40000 ALTER TABLE `customer_vehicle` DISABLE KEYS */; +INSERT INTO `customer_vehicle` VALUES (2,2,22043,NULL,'Moguri Vehicle','MOG1234',2018,'Black','new','gas',NULL,NULL,0,1); /*!40000 ALTER TABLE `customer_vehicle` ENABLE KEYS */; UNLOCK TABLES; @@ -339,15 +341,15 @@ DROP TABLE IF EXISTS `hub`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `hub` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, - `branch` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, - `address` longtext COLLATE utf8mb4_unicode_ci NOT NULL, + `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, + `address` longtext COLLATE utf8_unicode_ci NOT NULL, `coordinates` point NOT NULL COMMENT '(DC2Type:point)', - `contact_nums` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `contact_nums` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, `time_open` time NOT NULL, `time_close` time NOT NULL, + `branch` varchar(80) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -356,6 +358,7 @@ CREATE TABLE `hub` ( LOCK TABLES `hub` WRITE; /*!40000 ALTER TABLE `hub` DISABLE KEYS */; +INSERT INTO `hub` VALUES (1,'Moogle Hub #1','Moogle Road','\0\0\0\0\0\0\0vA3>‚A^@Ó¥Ú0-@','242-1234','00:00:00','23:59:00','Moogle Branch #1'),(2,'Moogle Hub #2','Moogle Drive','\0\0\0\0\0\0\0˜m§­‘C^@uìûËIo-@','12345678','06:00:00','20:00:00','Moogle Branch #2'),(3,'Moogle Hub #3','Moogle Lane','\0\0\0\0\0\0\0Ïw@_B^@:ÕµQø;-@','78945612','06:00:00','22:00:00','Moogle Branch #3'); /*!40000 ALTER TABLE `hub` ENABLE KEYS */; UNLOCK TABLES; @@ -387,7 +390,7 @@ CREATE TABLE `invoice` ( CONSTRAINT `FK_90651744A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`), CONSTRAINT `FK_90651744D0C07AFF` FOREIGN KEY (`promo_id`) REFERENCES `promo` (`id`), CONSTRAINT `FK_90651744EAD8C843` FOREIGN KEY (`job_order_id`) REFERENCES `job_order` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -396,6 +399,7 @@ CREATE TABLE `invoice` ( LOCK TABLES `invoice` WRITE; /*!40000 ALTER TABLE `invoice` DISABLE KEYS */; +INSERT INTO `invoice` VALUES (3,1,2,NULL,'2019-08-01 07:42:13',NULL,NULL,0.00,0.00,621.43,5178.57,5800.00,'draft'),(4,1,3,NULL,'2019-08-01 07:42:13',NULL,NULL,0.00,0.00,621.43,5178.57,5800.00,'draft'),(5,1,4,NULL,'2019-08-02 03:12:32',NULL,NULL,0.00,0.00,669.64,5580.36,6250.00,'draft'); /*!40000 ALTER TABLE `invoice` ENABLE KEYS */; UNLOCK TABLES; @@ -418,7 +422,7 @@ CREATE TABLE `invoice_item` ( KEY `IDX_1DDE477B19A19CFC` (`battery_id`), CONSTRAINT `FK_1DDE477B19A19CFC` FOREIGN KEY (`battery_id`) REFERENCES `battery` (`id`), CONSTRAINT `FK_1DDE477B2989F1FD` FOREIGN KEY (`invoice_id`) REFERENCES `invoice` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -427,6 +431,7 @@ CREATE TABLE `invoice_item` ( LOCK TABLES `invoice_item` WRITE; /*!40000 ALTER TABLE `invoice_item` DISABLE KEYS */; +INSERT INTO `invoice_item` VALUES (4,4,1039,'GOLD 1SM / D23 /NS50 / R',1,5800.00),(5,5,1045,'GOLD DIN44',1,6250.00); /*!40000 ALTER TABLE `invoice_item` ENABLE KEYS */; UNLOCK TABLES; @@ -452,7 +457,7 @@ CREATE TABLE `jo_event` ( CONSTRAINT `FK_59A3188E85564492` FOREIGN KEY (`create_user_id`) REFERENCES `user` (`id`), CONSTRAINT `FK_59A3188EEAD8C843` FOREIGN KEY (`job_order_id`) REFERENCES `job_order` (`id`), CONSTRAINT `FK_59A3188EFF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -461,6 +466,7 @@ CREATE TABLE `jo_event` ( LOCK TABLES `jo_event` WRITE; /*!40000 ALTER TABLE `jo_event` DISABLE KEYS */; +INSERT INTO `jo_event` VALUES (3,1,3,NULL,'2019-08-01 07:41:24','2019-08-01 07:41:24','create'),(4,1,3,NULL,'2019-08-01 07:42:13','2019-08-01 07:42:13','open_edit'),(5,1,3,NULL,'2019-08-02 03:11:19','2019-08-02 03:11:19','hub_assign'),(6,1,4,NULL,'2019-08-02 03:12:32','2019-08-02 03:12:32','create'),(7,1,4,NULL,'2019-08-02 03:12:54','2019-08-02 03:12:54','hub_assign'),(8,1,4,NULL,'2019-08-02 06:11:30','2019-08-02 06:11:30','rider_assign'),(9,1,4,NULL,'2019-08-02 06:12:22','2019-08-02 06:12:22','open_edit'),(10,1,4,NULL,'2019-08-02 06:13:00','2019-08-02 06:13:00','open_edit'),(11,1,3,NULL,'2019-08-02 06:13:20','2019-08-02 06:13:20','open_edit'); /*!40000 ALTER TABLE `jo_event` ENABLE KEYS */; UNLOCK TABLES; @@ -563,7 +569,7 @@ CREATE TABLE `job_order` ( CONSTRAINT `FK_F4752EE8AE8454D5` FOREIGN KEY (`assign_user_id`) REFERENCES `user` (`id`), CONSTRAINT `FK_F4752EE8EF160940` FOREIGN KEY (`process_user_id`) REFERENCES `user` (`id`), CONSTRAINT `FK_F4752EE8FF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -572,6 +578,7 @@ CREATE TABLE `job_order` ( LOCK TABLES `job_order` WRITE; /*!40000 ALTER TABLE `job_order` DISABLE KEYS */; +INSERT INTO `job_order` VALUES (3,1,NULL,1,2,2,1,NULL,NULL,NULL,'2019-08-01 07:41:24','2019-08-01 07:40:00',NULL,NULL,NULL,'\0\0\0\0\0\0\0º«úZºA^@ãÏÒBO;-@',121.02699923,14.61583909,0,'battery_new','private','call','rider_assign','','','','test for rider_assign status','',NULL,'cash','','','',NULL,0,0,NULL),(4,1,1,1,2,2,1,1,NULL,NULL,'2019-08-02 03:12:32','2019-08-02 03:11:00',NULL,NULL,'2019-08-02 06:11:30','\0\0\0\0\0\0\0ݬúÊA^@/¼M¥È8-@',121.01652789,14.61090581,0,'battery_new','private','call','assigned','','','','test for assigned status','',NULL,'cash','','','',NULL,0,0,NULL); /*!40000 ALTER TABLE `job_order` ENABLE KEYS */; UNLOCK TABLES; @@ -722,6 +729,7 @@ CREATE TABLE `mobile_session` ( LOCK TABLES `mobile_session` WRITE; /*!40000 ALTER TABLE `mobile_session` DISABLE KEYS */; +INSERT INTO `mobile_session` VALUES ('5d427428b1541',2,'iPhone8','IOS','11.4',NULL,'11376660-F8BF-46ED-B30A-EF3F361EE223','9221111112','123456',1,'2019-08-01 05:10:00','2019-08-01 05:10:02',NULL),('5d439b3a43f40',NULL,'iPhone8','IOS','11.4',NULL,'11376660-F8BF-46ED-B30A-EF3F361EE223',NULL,NULL,0,'2019-08-02 02:08:58',NULL,NULL); /*!40000 ALTER TABLE `mobile_session` ENABLE KEYS */; UNLOCK TABLES; @@ -854,7 +862,7 @@ CREATE TABLE `privacy_policy` ( `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL, `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -863,6 +871,7 @@ CREATE TABLE `privacy_policy` ( LOCK TABLES `privacy_policy` WRITE; /*!40000 ALTER TABLE `privacy_policy` DISABLE KEYS */; +INSERT INTO `privacy_policy` VALUES (1,'Mobile Policy #1','Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Dolor sed viverra ipsum nunc aliquet bibendum enim. In massa tempor nec feugiat. Nunc aliquet bibendum enim facilisis gravida. Nisl nunc mi ipsum faucibus vitae aliquet nec ullamcorper. Amet luctus venenatis lectus magna fringilla. Volutpat maecenas volutpat blandit aliquam etiam erat velit scelerisque in. Egestas egestas fringilla phasellus faucibus scelerisque eleifend. Sagittis orci a scelerisque purus semper eget duis. Nulla pharetra diam sit amet nisl suscipit. Sed adipiscing diam donec adipiscing tristique risus nec feugiat in. Fusce ut placerat orci nulla. Pharetra vel turpis nunc eget lorem dolor. Tristique senectus et netus et malesuada.\r\n\r\nEtiam tempor orci eu lobortis elementum nibh tellus molestie. Neque egestas congue quisque egestas. Egestas integer eget aliquet nibh praesent tristique. Vulputate mi sit amet mauris. Sodales neque sodales ut etiam sit. Dignissim suspendisse in est ante in. Volutpat commodo sed egestas egestas. Felis donec et odio pellentesque diam. Pharetra vel turpis nunc eget lorem dolor sed viverra. Porta nibh venenatis cras sed felis eget. Aliquam ultrices sagittis orci a. Dignissim diam quis enim lobortis. Aliquet porttitor lacus luctus accumsan. Dignissim convallis aenean et tortor at risus viverra adipiscing at.'),(2,'Third Party Policy #1','Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Dolor sed viverra ipsum nunc aliquet bibendum enim. In massa tempor nec feugiat. Nunc aliquet bibendum enim facilisis gravida. Nisl nunc mi ipsum faucibus vitae aliquet nec ullamcorper. Amet luctus venenatis lectus magna fringilla. Volutpat maecenas volutpat blandit aliquam etiam erat velit scelerisque in. Egestas egestas fringilla phasellus faucibus scelerisque eleifend. Sagittis orci a scelerisque purus semper eget duis. Nulla pharetra diam sit amet nisl suscipit. Sed adipiscing diam donec adipiscing tristique risus nec feugiat in. Fusce ut placerat orci nulla. Pharetra vel turpis nunc eget lorem dolor. Tristique senectus et netus et malesuada.\r\n\r\nEtiam tempor orci eu lobortis elementum nibh tellus molestie. Neque egestas congue quisque egestas. Egestas integer eget aliquet nibh praesent tristique. Vulputate mi sit amet mauris. Sodales neque sodales ut etiam sit. Dignissim suspendisse in est ante in. Volutpat commodo sed egestas egestas. Felis donec et odio pellentesque diam. Pharetra vel turpis nunc eget lorem dolor sed viverra. Porta nibh venenatis cras sed felis eget. Aliquam ultrices sagittis orci a. Dignissim diam quis enim lobortis. Aliquet porttitor lacus luctus accumsan. Dignissim convallis aenean et tortor at risus viverra adipiscing at.'),(3,'Promo Policy #1','Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Dolor sed viverra ipsum nunc aliquet bibendum enim. In massa tempor nec feugiat. Nunc aliquet bibendum enim facilisis gravida. Nisl nunc mi ipsum faucibus vitae aliquet nec ullamcorper. Amet luctus venenatis lectus magna fringilla. Volutpat maecenas volutpat blandit aliquam etiam erat velit scelerisque in. Egestas egestas fringilla phasellus faucibus scelerisque eleifend. Sagittis orci a scelerisque purus semper eget duis. Nulla pharetra diam sit amet nisl suscipit. Sed adipiscing diam donec adipiscing tristique risus nec feugiat in. Fusce ut placerat orci nulla. Pharetra vel turpis nunc eget lorem dolor. Tristique senectus et netus et malesuada.\r\n\r\nEtiam tempor orci eu lobortis elementum nibh tellus molestie. Neque egestas congue quisque egestas. Egestas integer eget aliquet nibh praesent tristique. Vulputate mi sit amet mauris. Sodales neque sodales ut etiam sit. Dignissim suspendisse in est ante in. Volutpat commodo sed egestas egestas. Felis donec et odio pellentesque diam. Pharetra vel turpis nunc eget lorem dolor sed viverra. Porta nibh venenatis cras sed felis eget. Aliquam ultrices sagittis orci a. Dignissim diam quis enim lobortis. Aliquet porttitor lacus luctus accumsan. Dignissim convallis aenean et tortor at risus viverra adipiscing at.'); /*!40000 ALTER TABLE `privacy_policy` ENABLE KEYS */; UNLOCK TABLES; @@ -949,7 +958,7 @@ CREATE TABLE `rider` ( UNIQUE KEY `UNIQ_EA411035F85E0677` (`username`), KEY `IDX_EA4110356C786081` (`hub_id`), CONSTRAINT `FK_EA4110356C786081` FOREIGN KEY (`hub_id`) REFERENCES `hub` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -958,6 +967,7 @@ CREATE TABLE `rider` ( LOCK TABLES `rider` WRITE; /*!40000 ALTER TABLE `rider` DISABLE KEYS */; +INSERT INTO `rider` VALUES (1,1,'Moguri','Moogle','12378945','MGI1234','',0,1,1,'moguri','$2y$12$hGnjP1btam.PF.7lImT8luVsGtGHU94bDSeXBRfmHSULV29qMdoSa'); /*!40000 ALTER TABLE `rider` ENABLE KEYS */; UNLOCK TABLES; @@ -1013,7 +1023,7 @@ CREATE TABLE `rider_schedule` ( PRIMARY KEY (`id`), KEY `IDX_3946A604FF881F6` (`rider_id`), CONSTRAINT `FK_3946A604FF881F6` FOREIGN KEY (`rider_id`) REFERENCES `rider` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1022,6 +1032,7 @@ CREATE TABLE `rider_schedule` ( LOCK TABLES `rider_schedule` WRITE; /*!40000 ALTER TABLE `rider_schedule` DISABLE KEYS */; +INSERT INTO `rider_schedule` VALUES (1,1,1,'08:00:00','21:00:00','12:00:00','13:00:00'),(2,1,3,'08:00:00','21:00:00','12:00:00','13:00:00'),(3,1,5,'08:00:00','21:00:00','12:00:00','13:00:00'),(4,1,6,'08:00:00','21:00:00','12:00:00','13:00:00'); /*!40000 ALTER TABLE `rider_schedule` ENABLE KEYS */; UNLOCK TABLES; @@ -1297,6 +1308,7 @@ CREATE TABLE `user_hubs` ( LOCK TABLES `user_hubs` WRITE; /*!40000 ALTER TABLE `user_hubs` DISABLE KEYS */; +INSERT INTO `user_hubs` VALUES (1,1),(1,2),(1,3); /*!40000 ALTER TABLE `user_hubs` ENABLE KEYS */; UNLOCK TABLES; @@ -1439,4 +1451,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-07-31 6:59:58 +-- Dump completed on 2019-08-02 8:22:24 -- 2.43.5 From 1849111bc6396945a8b6b45f00908241ff1d7d9c Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 5 Aug 2019 08:28:39 +0000 Subject: [PATCH 10/13] Add tests for add rider rating and cancel job order. #229 --- ...I - API Controller.postman_collection.json | 215 +++++++++++++++--- 1 file changed, 180 insertions(+), 35 deletions(-) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index e846d883..10216f01 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -1113,6 +1113,128 @@ }, "response": [] }, + { + "name": "[Normal] Add Rider Rating", + "event": [ + { + "listen": "test", + "script": { + "id": "a597d7d6-7b5c-4b30-9163-3cd475343e41", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Add rider rating\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "jo_id", + "value": "{{jo_id_for_rider_rating}}", + "type": "text" + }, + { + "key": "rating", + "value": "{{rating}}", + "type": "text" + }, + { + "key": "comment", + "value": "{{comment}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/rider_rating?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "rider_rating" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Cancel Job Order", + "event": [ + { + "listen": "test", + "script": { + "id": "1aca4c3c-353b-406d-b361-99b1b5e5331d", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Cancel job order\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "jo_id", + "value": "{{jo_id_for_cancel_jo}}", + "type": "text" + }, + { + "key": "reason", + "value": "{{cancel_reason}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/job_order/cancel?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "job_order", + "cancel" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, { "name": "[Normal] Privacy Settings", "event": [ @@ -1244,192 +1366,215 @@ ], "variable": [ { - "id": "167a69fc-9d8e-4686-9982-abfb54e85074", + "id": "5d93f375-0011-406c-a88f-a63e2f68488c", "key": "resq_url", "value": "resq.local", "type": "string", "disabled": true }, { - "id": "68e04044-0232-49c0-bfd0-708b6ada2ac6", + "id": "c5ab2ec9-5fa1-42c0-9b59-a5f39c341c93", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "8db9dac2-5e1c-4603-97f0-10d1eb1b4a81", + "id": "3a5bc033-4298-41f2-a2a6-723af86e8941", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "34a07c40-14e3-4fcc-abb5-0151bf753bb1", + "id": "1100e110-9b61-4e86-9e5b-0d2b9ce1d459", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "b1571266-c924-43bc-baa6-1a689e1697a3", + "id": "1e79c0c3-a365-48bf-b279-8082e49ab690", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "4f3f1213-63ad-486e-a15b-d6e8feed0c45", + "id": "72e74248-809b-46d5-a7f8-19132e90ebd4", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "ef69687c-18b7-4685-9df6-e36d43129694", + "id": "a9ed9e37-8497-4a6e-885c-e6bc7b90d0a2", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "e334a942-9c38-4b1e-ac27-6f202bc9e0a8", + "id": "99f734c3-1b7f-4c38-b1fd-33add5c21e90", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "16e39c37-0017-4bdb-a8ef-cbca36559674", + "id": "c4a4859a-fd69-42ac-b6f1-9b745b2e7e1e", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "b3eebff1-510c-4f38-91f8-c28f0307cb5f", + "id": "f6eaa575-52c9-43be-8d1a-e2b6d82155fd", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "9dba5a02-9235-4535-bc6f-33f42b6ca88e", + "id": "2abf6bbb-35e3-48bf-98b2-c935fa22f809", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "516a73e2-02bd-4f1f-93d1-a4d2f90d5068", + "id": "974d51f3-7de7-4601-aedf-8118534760fd", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "839c1326-0855-47d6-9cb1-82a46e510c3b", + "id": "302e37a0-de56-4dbb-b04d-51e6cc6ceb67", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "cdcf76b4-4a55-4d1f-a9f1-1ec750123a49", + "id": "c2bd2449-d853-4834-8610-2a50e7a2f44b", "key": "color", "value": "White", "type": "string" }, { - "id": "93f2699d-36e5-4434-b161-a6106e4856c4", + "id": "5e1c7cf7-6c2d-4ccb-a7c7-a57fd9f28cba", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "30b08c7f-44c8-4e1c-9d71-29b7429ce235", + "id": "a5f72792-689d-4cf3-889a-57389ce61e10", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "13d5a51b-04bf-422c-bc15-e49d51b0db40", + "id": "ad681bc9-dfb5-4c20-8df0-8be64917b87b", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "67b34475-18ec-4363-9191-52292c6ffade", + "id": "b36813a5-50a8-42da-be7a-6a393b7c4029", "key": "wty_expire", "value": "20201125", "type": "string" }, { - "id": "ee65965a-d81f-4f2f-9914-14d78c9a902f", + "id": "e2492bad-83af-4c36-b718-e735c615acf5", "key": "service_type", "value": "battery_new", "type": "string" }, { - "id": "c7d9df58-1734-479e-97cf-861aa531f6fe", + "id": "543637fd-dba2-47c7-ad57-17e7514c46e6", "key": "trade_in", "value": "MOTOLITE", "type": "string" }, { - "id": "a3bac62f-397c-4675-b3bc-bd25db55df5b", + "id": "4ccd2182-6d87-4293-a471-ec4ea3a36230", "key": "longitude", "value": "121.018039", "type": "string" }, { - "id": "b00513bc-65dd-4db5-95d4-2891553f8e77", + "id": "1af5abab-b961-4123-8ff2-8b6bfd26b64a", "key": "latitude", "value": "14.606807", "type": "string" }, { - "id": "d1cdd86f-885c-44aa-9987-70e74df6bf73", + "id": "339b4adb-35ea-4a62-9c18-5e0b4d510dba", "key": "warranty", "value": "private", "type": "string" }, { - "id": "22479270-44c9-4169-acb0-40dbaec1a846", + "id": "3011207b-0efe-4990-bf1a-07ac93f0d997", "key": "mode_of_payment", "value": "CASH", "type": "string" }, { - "id": "bc13ae82-5efa-4d2a-8791-a5811ea5bf3a", + "id": "906c85a0-d63c-49be-9bad-95a5c3995efa", "key": "delivery_address", "value": "#123 Moogle Drive", "type": "string" }, { - "id": "dd62622c-c609-4cdc-bddb-aa45bb53400a", + "id": "9d8631f3-6f4a-4617-b9c6-a891dbdb7080", "key": "delivery_instructions", "value": "Look for the red bon-bon", "type": "string" }, { - "id": "fafac17b-707a-48c5-a8ba-c3780e8925bb", + "id": "817cba3e-5a1c-4437-a3a1-a435fb6e2102", "key": "promo_id", "value": "1", "type": "string" }, { - "id": "dfa0051a-e129-4e56-a424-3ef8f46a10d0", + "id": "830e5413-aede-49d5-96d6-9f9ffd69d362", "key": "code", "value": "123456", "type": "string" }, { - "id": "cc83a9a4-c34b-4168-9493-225e7c93b1c8", + "id": "5c63ff91-5a46-46a6-bb50-a99fcf9c2469", "key": "batt_id", "value": "1050", "type": "string" }, { - "id": "2ae16b4a-bef8-47dd-a584-b0450d82381d", - "key": "cv_id", - "value": "2", - "type": "string", - "disabled": true + "id": "df43d18c-da1e-4d1e-a39e-ff497e1e3ade", + "key": "jo_id_for_rider_rating", + "value": "4", + "type": "string" }, { - "id": "ec6d34f3-44bc-43ba-8c8c-16b76ea00353", + "id": "ba2bfbc9-4177-46c9-9bba-a99fa4cf6800", "key": "preset_api_key", "value": "5d427428b1541", "type": "string" + }, + { + "id": "35e07ec1-e1ac-42ba-94cb-284fac688eeb", + "key": "rating", + "value": "4", + "type": "string" + }, + { + "id": "ab22b498-e2ae-4148-954f-6d3b42e2a8bc", + "key": "comment", + "value": "Very professional, kupo!", + "type": "string" + }, + { + "id": "4e7ec753-ab40-4814-8e54-2808a82659f0", + "key": "jo_id_for_cancel_jo", + "value": "3", + "type": "string" + }, + { + "id": "be480a65-6da0-48e3-b388-7545d237a123", + "key": "cancel_reason", + "value": "No money, kupo!", + "type": "string" } ] } \ No newline at end of file -- 2.43.5 From dc5bf07c197167f014a32d3d3683cdbef48185fe Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 13 Aug 2019 03:26:11 +0000 Subject: [PATCH 11/13] Add tests for partners, services, warranty activation, and location support. #229 --- ...I - API Controller.postman_collection.json | 579 ++++++++++++++++-- postman/resq_test.sql | 10 +- 2 files changed, 545 insertions(+), 44 deletions(-) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index 10216f01..bbf1dd9f 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -1235,6 +1235,168 @@ }, "response": [] }, + { + "name": "[Normal] Get JO History", + "event": [ + { + "listen": "test", + "script": { + "id": "bd898f60-4188-4063-903b-e802e195e97e", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get job order history\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.job_orders[0].id).to.eql(3);", + " pm.expect(jsonData.data.job_orders[0].customer_vehicle.plate_number).to.eql(\"MOG1234\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/job_order/history?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "job_order", + "history" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get JO Invoice", + "event": [ + { + "listen": "test", + "script": { + "id": "f6aec690-14a8-4c12-940d-242547577f2f", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get job order invoice\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.items[0].title).to.eql(\"GOLD 1SM / D23 /NS50 / R\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "jo_id", + "value": "{{jo_id_for_cancel_jo}}", + "type": "text", + "disabled": true + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/job_order/invoice?api_key={{preset_api_key}}&jo_id={{jo_id_for_cancel_jo}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "job_order", + "invoice" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + }, + { + "key": "jo_id", + "value": "{{jo_id_for_cancel_jo}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Update Device ID", + "event": [ + { + "listen": "test", + "script": { + "id": "f412a2f4-4409-4928-9c4a-c62f9d1b7533", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Update device ID\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "device_id", + "value": "{{device_id}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/device_id?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "device_id" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, { "name": "[Normal] Privacy Settings", "event": [ @@ -1288,6 +1450,101 @@ }, "response": [] }, + { + "name": "[Normal] Resend Code", + "event": [ + { + "listen": "test", + "script": { + "id": "bfa9f9d2-9ae6-4978-bd67-b7317a22cbf1", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Resend code\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "{{resq_url}}/api/resend_code?api_key={{preset_api_key_unconfirmed}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "resend_code" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key_unconfirmed}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Location Support", + "event": [ + { + "listen": "test", + "script": { + "id": "538d8939-f19a-49c7-a4b4-3b06cfd5676b", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Location support\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.supported).to.eql(true);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/location_support?api_key={{preset_api_key}}&longitude={{longitude}}&latitude={{latitude}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "location_support" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + }, + { + "key": "longitude", + "value": "{{longitude}}" + }, + { + "key": "latitude", + "value": "{{latitude}}" + } + ] + } + }, + "response": [] + }, { "name": "[Normal] Activate Warranty", "event": [ @@ -1300,10 +1557,10 @@ " pm.response.to.have.status(200);", "});", "", - "//pm.test(\"Activate warranty\", function () {", - "// var jsonData = pm.response.json();", - "// pm.expect(jsonData.error.status).to.eql(\"success\");", - "//});" + "pm.test(\"Activate warranty\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" ], "type": "text/javascript" } @@ -1323,7 +1580,7 @@ ] }, "url": { - "raw": "{{resq_url}}/api/activate_warranty?api_key={{api_key}}", + "raw": "{{resq_url}}/api/activate_warranty?api_key={{preset_api_key}}", "host": [ "{{resq_url}}" ], @@ -1334,7 +1591,217 @@ "query": [ { "key": "api_key", - "value": "{{api_key}}" + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] List Services", + "event": [ + { + "listen": "test", + "script": { + "id": "68ade044-b9d3-4425-a8b4-16674778f6dc", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"List of services is present\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.services.length).to.be.gt(0);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/services?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "services" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Get partner information", + "event": [ + { + "listen": "test", + "script": { + "id": "6c3ba8c3-f0ae-40ab-a884-cd540d592653", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get partner information and reviews\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.partner).to.have.property('id');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/partners/{{partner_id}}?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "partners", + "{{partner_id}}" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + }, + "description": "Get partner details and reviews" + }, + "response": [] + }, + { + "name": "[Normal] Get list of closest partners", + "event": [ + { + "listen": "test", + "script": { + "id": "94823df8-bf4f-42a9-843f-e7b1c5ceda29", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"List of partners is present\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + " pm.expect(jsonData.data.partners.length).to.be.gt(0);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{resq_url}}/api/partners?api_key={{preset_api_key}}&longitude={{longitude}}&latitude={{latitude}}&limit={{limit}}&service_id={{service_id}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "partners" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + }, + { + "key": "longitude", + "value": "{{longitude}}" + }, + { + "key": "latitude", + "value": "{{latitude}}" + }, + { + "key": "limit", + "value": "{{limit}}" + }, + { + "key": "service_id", + "value": "{{service_id}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Review Partner", + "event": [ + { + "listen": "test", + "script": { + "id": "26cdf169-7282-4ceb-9ab5-237e70dfb70d", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Review partnert\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "rating", + "value": "{{rating}}", + "type": "text" + }, + { + "key": "message", + "value": "{{comment}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/partners/{{partner_id}}/review?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "partners", + "{{partner_id}}", + "review" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" } ] } @@ -1366,215 +1833,245 @@ ], "variable": [ { - "id": "5d93f375-0011-406c-a88f-a63e2f68488c", + "id": "8d2330fb-5db8-46f6-b179-9b587b7ffdae", "key": "resq_url", "value": "resq.local", "type": "string", "disabled": true }, { - "id": "c5ab2ec9-5fa1-42c0-9b59-a5f39c341c93", + "id": "85913ee7-5c59-4194-b63a-10a2d67e7e13", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "3a5bc033-4298-41f2-a2a6-723af86e8941", + "id": "9db4816f-5b02-41ac-a517-ea7313349e2f", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "1100e110-9b61-4e86-9e5b-0d2b9ce1d459", + "id": "92eabed4-7c39-4cf8-bb8b-3f2422e28a88", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "1e79c0c3-a365-48bf-b279-8082e49ab690", + "id": "37fe6cd6-f03f-41e4-be90-dd0130884458", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "72e74248-809b-46d5-a7f8-19132e90ebd4", + "id": "41b56804-7a1e-422e-888c-998eeca61af2", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "a9ed9e37-8497-4a6e-885c-e6bc7b90d0a2", + "id": "5613ed18-d7bc-42a2-9052-59ce6cf18384", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "99f734c3-1b7f-4c38-b1fd-33add5c21e90", + "id": "5d2ed826-cd18-4dea-b175-6fbc444f50d1", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "c4a4859a-fd69-42ac-b6f1-9b745b2e7e1e", + "id": "d33dfddc-44c0-4e85-983d-9b0916021bcc", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "f6eaa575-52c9-43be-8d1a-e2b6d82155fd", + "id": "8756da11-2452-4382-bee9-d87a2917c5c0", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "2abf6bbb-35e3-48bf-98b2-c935fa22f809", + "id": "062322be-b65a-4a7d-9069-14d5b9e08691", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "974d51f3-7de7-4601-aedf-8118534760fd", + "id": "7ffa69c3-0c9b-424e-9d51-16b246843dd5", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "302e37a0-de56-4dbb-b04d-51e6cc6ceb67", + "id": "24c12bf8-25e9-4487-bbc9-f1f78e9885f0", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "c2bd2449-d853-4834-8610-2a50e7a2f44b", + "id": "aeaa3842-7788-4978-a9ff-5aa06cd4208e", "key": "color", "value": "White", "type": "string" }, { - "id": "5e1c7cf7-6c2d-4ccb-a7c7-a57fd9f28cba", + "id": "7a1d5798-256b-4f58-a901-e0f4d590b791", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "a5f72792-689d-4cf3-889a-57389ce61e10", + "id": "37cc3206-05f8-41cb-bfda-7b31b3ac0f1f", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "ad681bc9-dfb5-4c20-8df0-8be64917b87b", + "id": "c1c743a5-8795-45ad-9fc3-6b4a3a685b1a", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "b36813a5-50a8-42da-be7a-6a393b7c4029", + "id": "546efeb7-b0b1-49d6-baed-2bb0d81e6db4", "key": "wty_expire", "value": "20201125", "type": "string" }, { - "id": "e2492bad-83af-4c36-b718-e735c615acf5", + "id": "f593c5e2-a408-453d-ae48-31eb0ac94d2b", "key": "service_type", "value": "battery_new", "type": "string" }, { - "id": "543637fd-dba2-47c7-ad57-17e7514c46e6", + "id": "ccbd96fb-d538-41c6-aa98-fbd30db888df", "key": "trade_in", "value": "MOTOLITE", "type": "string" }, { - "id": "4ccd2182-6d87-4293-a471-ec4ea3a36230", + "id": "a12f7829-c214-405a-8966-42886a6c01cf", "key": "longitude", "value": "121.018039", "type": "string" }, { - "id": "1af5abab-b961-4123-8ff2-8b6bfd26b64a", + "id": "03e74d4e-84b5-486c-a345-c6912c3b634d", "key": "latitude", "value": "14.606807", "type": "string" }, { - "id": "339b4adb-35ea-4a62-9c18-5e0b4d510dba", + "id": "ccc96e0c-20ed-487a-93d4-f587d5868396", "key": "warranty", "value": "private", "type": "string" }, { - "id": "3011207b-0efe-4990-bf1a-07ac93f0d997", + "id": "1a06bec2-ccff-470b-87c6-976c5fd45e46", "key": "mode_of_payment", "value": "CASH", "type": "string" }, { - "id": "906c85a0-d63c-49be-9bad-95a5c3995efa", + "id": "e0f7a8aa-8641-4be4-b835-9d4e22bc9f66", "key": "delivery_address", "value": "#123 Moogle Drive", "type": "string" }, { - "id": "9d8631f3-6f4a-4617-b9c6-a891dbdb7080", + "id": "07b61f80-1944-49e8-9fb1-ba53e138eed6", "key": "delivery_instructions", "value": "Look for the red bon-bon", "type": "string" }, { - "id": "817cba3e-5a1c-4437-a3a1-a435fb6e2102", + "id": "49422a74-4683-4fad-80f3-fad0fe7c1674", "key": "promo_id", "value": "1", "type": "string" }, { - "id": "830e5413-aede-49d5-96d6-9f9ffd69d362", + "id": "6f778734-29ec-47d3-b8c0-dc56c403408c", "key": "code", "value": "123456", "type": "string" }, { - "id": "5c63ff91-5a46-46a6-bb50-a99fcf9c2469", + "id": "4f5e4acf-511e-43e7-96aa-1bb8f92a60e3", "key": "batt_id", "value": "1050", "type": "string" }, { - "id": "df43d18c-da1e-4d1e-a39e-ff497e1e3ade", + "id": "c43b9981-550a-40b6-b3a6-28007f8bb8a8", "key": "jo_id_for_rider_rating", "value": "4", "type": "string" }, { - "id": "ba2bfbc9-4177-46c9-9bba-a99fa4cf6800", + "id": "436646d7-8233-493d-aada-241fe92085a8", "key": "preset_api_key", "value": "5d427428b1541", "type": "string" }, { - "id": "35e07ec1-e1ac-42ba-94cb-284fac688eeb", + "id": "65fcc401-ba87-4a22-be52-9cf1c7e1ffa5", "key": "rating", "value": "4", "type": "string" }, { - "id": "ab22b498-e2ae-4148-954f-6d3b42e2a8bc", + "id": "d50b735d-29e3-48aa-8391-af2cc638a600", "key": "comment", "value": "Very professional, kupo!", "type": "string" }, { - "id": "4e7ec753-ab40-4814-8e54-2808a82659f0", + "id": "e5790ffa-d2aa-4210-936c-9cbcddec4e87", "key": "jo_id_for_cancel_jo", "value": "3", "type": "string" }, { - "id": "be480a65-6da0-48e3-b388-7545d237a123", + "id": "d5a7f058-4e54-47ac-b60b-d3595618adb1", "key": "cancel_reason", "value": "No money, kupo!", "type": "string" + }, + { + "id": "ca9ad85f-5809-42aa-afcd-89008810e6b2", + "key": "device_id", + "value": "123456", + "type": "string" + }, + { + "id": "6b7f078a-e509-4fb9-b99d-91c48cb26718", + "key": "partner_id", + "value": "1", + "type": "string" + }, + { + "id": "98abae1f-9ca4-4041-95d3-62c659fc11b7", + "key": "preset_api_key_unconfirmed", + "value": "5d439b3a43f40", + "type": "string" + }, + { + "id": "37bddaba-3933-4895-adf9-8b2b1be68d48", + "key": "service_id", + "value": "2", + "type": "string" + }, + { + "id": "94e86dc8-2237-41b1-8fdc-8da7e1ac8331", + "key": "limit", + "value": "5", + "type": "string" } ] } \ No newline at end of file diff --git a/postman/resq_test.sql b/postman/resq_test.sql index 19a1377e..7818f398 100644 --- a/postman/resq_test.sql +++ b/postman/resq_test.sql @@ -786,7 +786,7 @@ CREATE TABLE `partner` ( PRIMARY KEY (`id`), KEY `IDX_312B3E1685564492` (`create_user_id`), CONSTRAINT `FK_312B3E1685564492` FOREIGN KEY (`create_user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -795,6 +795,7 @@ CREATE TABLE `partner` ( LOCK TABLES `partner` WRITE; /*!40000 ALTER TABLE `partner` DISABLE KEYS */; +INSERT INTO `partner` VALUES (1,1,'Moogle Partner #1','2019-08-13 03:02:42','Moogle Branch #1','Address #1','\0\0\0\0\0\0\0_\0ê¶@^@\"³lÝ.5-@','12345678','03:00:00','15:00:00'); /*!40000 ALTER TABLE `partner` ENABLE KEYS */; UNLOCK TABLES; @@ -822,6 +823,7 @@ CREATE TABLE `partner_services` ( LOCK TABLES `partner_services` WRITE; /*!40000 ALTER TABLE `partner_services` DISABLE KEYS */; +INSERT INTO `partner_services` VALUES (1,1),(1,2); /*!40000 ALTER TABLE `partner_services` ENABLE KEYS */; UNLOCK TABLES; @@ -922,7 +924,7 @@ CREATE TABLE `review` ( KEY `IDX_794381C69A67BEF1` (`mobile_session_id`), CONSTRAINT `FK_794381C69393F8FE` FOREIGN KEY (`partner_id`) REFERENCES `partner` (`id`), CONSTRAINT `FK_794381C69A67BEF1` FOREIGN KEY (`mobile_session_id`) REFERENCES `mobile_session` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1114,6 +1116,7 @@ CREATE TABLE `sap_battery` ( LOCK TABLES `sap_battery` WRITE; /*!40000 ALTER TABLE `sap_battery` DISABLE KEYS */; +INSERT INTO `sap_battery` VALUES ('ECHB20AB-CPN00-LX',3,3),('ECHB20AB-SPN00-LX',3,3),('ECHB24AB-SPN00-L',3,4),('ECHC24AL-SPN00-L',3,6),('ECHD23AL-SPN00-LX',3,5),('ECHD26AL-SPN00-LX',3,1),('ECHD31AL-SPN00-LX',3,2),('ECHE41AL-SPN00-LX',3,7),('ECHF51AL-SPN00-LX',3,8),('ECHG51AL-SPN00-LX',3,9),('ECHH52AL-SPN00-LX',3,10),('EDFB20AB-CPN00-L',18,3),('EDFB24AB-SPN00-L',18,4),('EDFD23AL-SPN00-L',18,5),('EDFD26AL-SPN00-L',18,1),('EDFD31AL-SPN00-L',18,2),('EDFE41AL-SPN00-L',18,7),('EDFF51AL-SPN00-L',18,8),('EDFG51AL-SPN00-L',18,9),('EDFH52AL-SPN00-L',18,10),('EDPB20AB-CPN00-LX',19,3),('EDPB24AB-SPN00-LX',19,4),('EDPD23AL-SPN00-LX',19,5),('EDPD26AL-SPN00-LX',19,1),('EDPD31AL-SPN00-LX',19,2),('EDPE41AL-SPN00-LX',19,7),('EDPF51AL-SPN00-LX',19,8),('EDPG51AL-SPN00-LX',19,9),('EEFB24BB-SPN00-L',12,4),('EEFD23BL-SPN00-L',12,5),('EEFD26BL-SPN00-L',12,1),('EEFD31BL-SPN00-L',12,2),('EEFE41BL-SPN00-L',12,7),('EEFF51BL-SPN00-L',12,8),('EEFG51BL-SPN00-L',12,9),('EEFH52BL-SPN00-L',12,10),('EELB20AB-CPN00-L',6,3),('EELB24AB-SPN00-L',6,4),('EELD23AL-SPN00-L',6,5),('EELD26AL-SPN00-L',6,1),('EELD31AL-SPN00-L',6,2),('EELE41AL-SPN00-L',6,7),('EELF51AL-SPN00-L',6,8),('EELG51AL-SPN00-L',6,9),('EELH52AL-SPN00-L',6,10),('EMC6TNPR-SPN00-L',11,36),('EMFD26AL-SPN00-L',10,1),('EMFD31AL-SPN00-L',10,2),('EMFE41AL-SPN00-L',10,7),('EMFF51AL-SPN00-L',10,8),('EMFG51AL-SPN00-L',10,9),('EMSD26DL-SPN00-L',13,1),('EMSD31DL-SPN00-L',13,2),('EMTD26CL-SPN00-L',16,1),('EMTD31CL-SPN00-L',16,2),('EMTE41CL-SPN00-L',16,7),('EMTF51CL-SPN00-L',16,8),('EMTG51CF-SPN00-L',16,9),('EMTG51CL-SPN00-L',16,9),('EMTH52CF-SPN00-L',16,37),('EMTH52CL-SPN00-L',16,10),('EPLD23AL-SPN00-L',14,5),('EPLD26AL-SPN00-L',14,1),('EPLD31AL-SPN00-L',14,2),('EPLE41AL-SPN00-L',14,7),('EPLF51AL-SPN00-L',14,8),('EPLG51AL-SPN00-L',14,9),('ERMB24AB-SPN00-L',15,4),('ERMD26AL-SPN00-L',15,1),('ERMD31AL-SPN00-L',15,2),('ERME41AL-SPN00-L',15,7),('ERMF51AL-SPN00-L',15,8),('ERMG51AL-SPN00-L',15,9),('ESRB24LF-SPN00-L',4,4),('ESRD31NG-SPN00-L',4,2),('ESRE41PG-SPN00-L',4,7),('ESRF51QG-SPN00-L',4,8),('ESRG51RF-SPN00-L',4,9),('ESRH52TF-SPN00-L',4,10),('EVLD26AL-SPN00-L',17,1),('EVLD31AL-SPN00-L',17,2),('EVLE41AL-SPN00-L',17,7),('EVLF51AL-SPN00-L',17,8),('EVLG51AL-SPN00-L',17,9),('EYKB20CB-SPN00-L',21,3),('EYKB24CB-SPN00-L',21,4),('EYKD26CL-SPN00-L',21,1),('EYKD31CL-SPN00-L',21,2),('EYKE41CL-SPN00-L',21,7),('EYKF51CL-SPN00-L',21,8),('EYKG51CL-SPN00-L',21,9),('EYSD26AL-CPN00-L',23,1),('EYSD31AL-CPN00-L',23,2),('EYSE41AL-CPN00-L',23,7),('EYSG51AL-CPN00-L',23,9),('EYTB20AB-CPN00-L',22,3),('EYTB20AB-CPN00-LX',22,3),('EYTD26AL-SPN00-L',22,1),('EYTD26AL-SPN00-LX',22,1),('EYTD31AL-SPN00-L',22,2),('EYTD31CL-SPN00-LX',22,2),('EYTE41AL-SPN00-L',22,7),('EYTE41AL-SPN00-LX',22,7),('EYTF51AL-SPN00-L',22,8),('EYTF51BL-SPN00-LX',22,8),('EYTG51AL-SPN00-L',22,9),('EYTG51BL-SPN00-LX',22,9),('WATB31QT-CPP00-L',4,2),('WCHB20BB-CPN00-LX',2,3),('WCHB24BB-CPN00-LX',2,4),('WCHD23BL-CPN00-LX',2,5),('WCHD26BL-CPN00-LX',2,1),('WCHD31BL-CPN00-LX',2,2),('WCMG24BL-CPN00-L',1,1),('WCMG27HL-CPN00-L',1,2),('WCYG24IL-CPN00-L',1,1),('WDPB20BB-CPN00-LX',19,3),('WDPB20CA-CPN00-LX',19,3),('WDPB24BB-CPN00-LX',19,4),('WDPB24CB-CPN00-LX',19,4),('WDPL23BL-CPN00-LX',19,5),('WDPL23CL-CPN00-LX',19,5),('WDPL26BL-CPN00-LX',19,1),('WDPL26CL-CPN00-LX',19,1),('WDPL31BL-CPN00-LX',19,2),('WDPL31CL-CPN00-LX',19,2),('WDSB24DA-CPN00-LX',20,4),('WDSB24DB-CPN00-LX',20,4),('WDSL23DL-CPN00-LX',20,5),('WDSL26DL-CPN00-LX',20,1),('WDSL26DR-CPN00-LX',20,29),('WDSL31DL-CPN00-LX',20,2),('WDSL31DR-CPN00-LX',20,17),('WEBL23EL-CPNMD-L',5,5),('WMEB20CB-CPN00-LX',7,3),('WMEB21CB-CPN00-LX',7,3),('WMEB24CA-CPN00-LX',7,15),('WMEB24CB-CPN00-LX',7,4),('WMEC24CL-CPN00-LX',7,6),('WMEL23CL-CPN00-LX',7,5),('WMEL26CL-CPN00-LX',7,1),('WMEL31CL-CPN00-LX',7,2),('WMEN44CL-CPN00-LX',7,16),('WMGB20CB-CPNHD-L',9,3),('WMGB20DA-CPN00-LX',9,18),('WMGB20DB-CPN00-LX',9,3),('WMGB20DB-CPNSZ-L',9,3),('WMGB20DI-CPNTY-L',9,3),('WMGB21DA-CPN00-LX',9,18),('WMGB21DA-CPNHY-L',9,18),('WMGB21DB-CPN00-LX',9,3),('WMGB24DA-CPN00-LX',9,15),('WMGB24DB-CPN00-LX',9,4),('WMGB24DB-CPNNI-L',9,4),('WMGB24DL-CPNTY-L',9,4),('WMGB24EB-CPNNI-L',9,4),('WMGD204L-TSP00-L',9,19),('WMGD23BL-CPN00-L',9,5),('WMGD23DL-CPNFD-L',9,5),('WMGD23ER-CPNIZ-L',9,5),('WMGD23FR-CPPIZ-L',9,5),('WMGD317R-CPNMB-L',9,2),('WMGD31EL-CPNM0-L',9,2),('WMGD31EL-CPNMB-L',9,2),('WMGD31IR-SPNIZ-L',9,17),('WMGD78DD-CPP00-L',9,20),('WMGG275R-CPNIZ-L',9,17),('WMGG47DL-CPN00-L',9,21),('WMGG47DL-CPNTY-L',9,22),('WMGG48DL-CPN00-L',9,23),('WMGG48EL-CPNTY-L',9,24),('WMGG49EL-CPN00-L',9,25),('WMGG65DE-CPP00-L',9,26),('WMGG65FR-CPPFD-L',9,26),('WMGG94DL-TSP00-L',9,27),('WMGL23DL-CPN00-LX',9,5),('WMGL23DL-CPNM0-L',9,5),('WMGL23DL-CPNMB-L',9,5),('WMGL23DR-CPN00-LX',9,28),('WMGL26DL-CPN00-LX',9,1),('WMGL26DR-CPN00-LX',9,29),('WMGL31DL-CPN00-LX',9,2),('WMGL31DL-CPNIZ-L',9,2),('WMGL31DR-CPN00-LX',9,17),('WMGLN2DL-CPNTY-L',9,1),('WMGLN3EL-CPNTY-L',9,2),('WMGN44DL-CPN00-L',9,16),('WMGN44DL-CPNFD-L',9,16),('WMGN44DL-CPNHY-L',9,16),('WMGN55DL-CPN00-L',9,30),('WMGN55DR-CPN00-L',9,31),('WMGN66DL-CPN00-L',9,32),('WMGN66DL-CPNFD-L',9,32),('WMGN66DR-CPN00-L',9,33),('WMGN77DL-TSP00-L',9,34),('WMGN88DL-CPN00-L',9,35),('WMMGC2UH-SPN00-L',4,11),('WMMGC8SH-SPN00-L',4,12),('WMMGT6UH-SPN00-L',4,13),('WMMGT8SH-SPN00-L',4,14),('WMTE41CL-CPN00-L',16,38),('WMTF51CL-CPN00-L',16,39),('WMTG51CL-CPN00-L',16,40),('WMTH52CL-CPN00-L',16,41),('WMXB24EA-CPN00-LX',8,15),('WMXB24EB-CPN00-LX',8,4),('WMXB24FA-CPNSZ-L',8,15),('WMXD235L-CPNIZ-L',8,5),('WMXD23FL-CPPIZ-L',8,5),('WMXD26FL-SPNIZ-L',8,1),('WMXD31FL-CPNUM-L',8,2),('WMXD31IR-CPNFD-L',8,2),('WMXG24FI-CPNIZ-L',8,1),('WMXG24FI-CPPIZ-L',8,1),('WMXG278E-CPNFD-L',8,2),('WMXL23EL-CPN00-LX',8,5),('WMXL31EL-CPNKI-L',8,2),('WMXN87EL-CPN00-LX',8,2),('WMXX26EL-CPN00-LX',8,1),('WMXX31EL-CPN00-L',8,2),('WMXX31EL-CPN00-LX',8,2),('WMXX31ER-CPNSY-LX',8,17),('WMXY26EL-CPN00-LX',8,1),('WODD236L-CPPMB-L',9,5),('WODG247L-CPPMB-L',9,1),('WODG278L-CPPMB-L',9,2),('WODR23DI-CPNMB-L',9,5),('WODR26EL-CPNMB-L',9,1),('WODR31EL-CPNMB-L',9,2),('WOLB20DB-CPNMB-L',9,3),('WPLB24DB-CPN00-L',14,4),('WPLG24DL-CPN00-L',14,1),('WPLG27DL-CPN00-L',14,2),('WSOA465F-TSP00-L',4,5),('WSOD317M-CP403-E',4,2),('WSOD317M-CPP00-L',4,2),('WTGB20DA-CPNTY-L',9,18),('WTGB20DB-CPNTY-L',9,3),('WTGB20DL-CPNTY-L',9,18),('WTGB24DL-CPNTY-L',9,4),('WTGG47DL-CPNTY-L',9,22),('WTGG48EL-CPNTY-L',9,24),('WTGL26EL-CPNTY-LX',9,1),('WTGL26ER-CPNTY-LX',9,29),('WTGL31EL-CPNTY-LX',9,2),('WTGR23DL-CPNTY-L',9,5),('WTGR26EL-CPNTY-L',9,1),('WTGR26ER-CPNTY-L',9,29),('WTGR31EL-CPNTY-L',9,2),('WYKB20CB-CPN00-L',21,3),('WYKB20DB-CPN00-L',21,3),('WYKB24CB-CPN00-L',21,4),('WYKB24DB-CPN00-L',21,4),('WYKL26CL-CPN00-L',21,1),('WYKL26CR-CPN00-L',21,29),('WYKL26DL-CPN00-L',21,1),('WYKL26DR-CPN00-L',21,29),('WYKL31CL-CPN00-L',21,2),('WYKL31CR-CPN00-L',21,17),('WYKL31DL-CPN00-L',21,2),('WYKL31DR-CPN00-L',21,17),('WYKN44DL-CPN00-L',21,16),('WYKN55DL-CPN00-L',21,30),('WYKN66DL-CPN00-L',21,32),('WZMB31QT-CPP00-L',4,2),('WZMB31QT-CPP00-S',4,1),('WZMB31QT-CPP01-S',4,1); /*!40000 ALTER TABLE `sap_battery` ENABLE KEYS */; UNLOCK TABLES; @@ -1439,6 +1442,7 @@ CREATE TABLE `warranty` ( LOCK TABLES `warranty` WRITE; /*!40000 ALTER TABLE `warranty` DISABLE KEYS */; +INSERT INTO `warranty` VALUES (0,NULL,NULL,'WMEB24CB-CPN00-LX',NULL,'AJ34LJADR12134LKJL5','private','MGL1234','Moguri','Kupo','9221111112','active','2019-07-16 01:46:48','2018-10-01','2019-10-01',NULL,0); /*!40000 ALTER TABLE `warranty` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -1451,4 +1455,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-08-02 8:22:24 +-- Dump completed on 2019-08-13 3:10:12 -- 2.43.5 From 7a5de5c7a49952e0bb8f3dfbf817b69220d1a7e1 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 27 Aug 2019 07:54:17 +0000 Subject: [PATCH 12/13] Add normal and abnormal test scripts for set privacy policy for warranty. #229 --- ...I - API Controller.postman_collection.json | 383 ++++++++++++++++-- 1 file changed, 343 insertions(+), 40 deletions(-) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index bbf1dd9f..4923ec31 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -1807,6 +1807,285 @@ } }, "response": [] + }, + { + "name": "[Normal] Set Privacy Policy to Existing Policy", + "event": [ + { + "listen": "test", + "script": { + "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Set privacy policy\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "privacy_policy_id", + "value": "{{privacy_policy_id}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "warranty", + "{{wid}}", + "privacy_policy" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Normal] Set Privacy Policy to null", + "event": [ + { + "listen": "test", + "script": { + "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Set privacy policy\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"success\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "privacy_policy_id", + "value": "0", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "warranty", + "{{wid}}", + "privacy_policy" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Abnormal] Set Privacy Policy - Non existent privacy policy", + "event": [ + { + "listen": "test", + "script": { + "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Set privacy policy - Non existent privacy policy\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"error\");", + " pm.expect(jsonData.error.message).to.eql(\"No privacy policy found.\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "privacy_policy_id", + "value": "{{non_existent_policy_id}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "warranty", + "{{wid}}", + "privacy_policy" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Abnormal] Set Privacy Policy - Non-existent warranty", + "event": [ + { + "listen": "test", + "script": { + "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Set privacy policy - Non existent warranty\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"error\");", + " pm.expect(jsonData.error.message).to.eql(\"No warranty found.\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "privacy_policy_id", + "value": "{{privacy_policy_id}}", + "type": "text" + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/warranty/{{non_existent_wid}}/privacy_policy?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "warranty", + "{{non_existent_wid}}", + "privacy_policy" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] + }, + { + "name": "[Abnormal] Set Privacy Policy - Missing policy ID", + "event": [ + { + "listen": "test", + "script": { + "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Set privacy policy - missing policy ID\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.error.status).to.eql(\"error\");", + " pm.expect(jsonData.error.message).to.eql(\"Missing parameter(s): privacy_policy_id\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "privacy_policy_id", + "value": "{{privacy_policy_id}}", + "type": "text", + "disabled": true + } + ] + }, + "url": { + "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", + "host": [ + "{{resq_url}}" + ], + "path": [ + "api", + "warranty", + "{{wid}}", + "privacy_policy" + ], + "query": [ + { + "key": "api_key", + "value": "{{preset_api_key}}" + } + ] + } + }, + "response": [] } ], "event": [ @@ -1833,245 +2112,269 @@ ], "variable": [ { - "id": "8d2330fb-5db8-46f6-b179-9b587b7ffdae", + "id": "b1881df0-5aa2-438c-8ac5-46ccd259f2c0", "key": "resq_url", "value": "resq.local", "type": "string", "disabled": true }, { - "id": "85913ee7-5c59-4194-b63a-10a2d67e7e13", + "id": "59777f63-095b-4325-a86e-f6adceb729a8", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "9db4816f-5b02-41ac-a517-ea7313349e2f", + "id": "fc1b400f-5d55-4471-95f1-359b75eb7a2b", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "92eabed4-7c39-4cf8-bb8b-3f2422e28a88", + "id": "aa7c948b-2de9-4691-82e7-bb6024403602", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "37fe6cd6-f03f-41e4-be90-dd0130884458", + "id": "44e211e0-50f4-4903-9e21-b1527f887390", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "41b56804-7a1e-422e-888c-998eeca61af2", + "id": "44636d6d-4522-4ffb-a459-f05011b103a0", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "5613ed18-d7bc-42a2-9052-59ce6cf18384", + "id": "4eb61ece-c824-4840-8f14-ae91e34ba6cc", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "5d2ed826-cd18-4dea-b175-6fbc444f50d1", + "id": "35704451-b847-4099-b119-96c091bdf787", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "d33dfddc-44c0-4e85-983d-9b0916021bcc", + "id": "0cfe09d1-c6e2-40db-9f19-684ff95f8b9c", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "8756da11-2452-4382-bee9-d87a2917c5c0", + "id": "e0b3374d-559b-48ca-8df3-b9383b54b1c8", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "062322be-b65a-4a7d-9069-14d5b9e08691", + "id": "e462ba31-08b2-4e93-b88d-bde3d74600e1", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "7ffa69c3-0c9b-424e-9d51-16b246843dd5", + "id": "f7b3bb29-f9e8-48bf-bb6e-160b5a99537b", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "24c12bf8-25e9-4487-bbc9-f1f78e9885f0", + "id": "56b95327-9735-4e0b-b1b5-6e8dd2a06b57", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "aeaa3842-7788-4978-a9ff-5aa06cd4208e", + "id": "21873510-bb46-4b6d-861a-1269b3d693ec", "key": "color", "value": "White", "type": "string" }, { - "id": "7a1d5798-256b-4f58-a901-e0f4d590b791", + "id": "ca7c31a9-a64c-44ce-bd21-ed6fb959a8fc", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "37cc3206-05f8-41cb-bfda-7b31b3ac0f1f", + "id": "916d7aad-3769-4680-8898-2f662cd84da8", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "c1c743a5-8795-45ad-9fc3-6b4a3a685b1a", + "id": "9335b8b3-c38e-48c9-b2de-f41db10bbe33", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "546efeb7-b0b1-49d6-baed-2bb0d81e6db4", + "id": "02c4d2e7-eb4e-4812-b154-b463b5a9d862", "key": "wty_expire", "value": "20201125", "type": "string" }, { - "id": "f593c5e2-a408-453d-ae48-31eb0ac94d2b", + "id": "f8c89bf6-1aed-4664-b169-d38cf4fa564d", "key": "service_type", "value": "battery_new", "type": "string" }, { - "id": "ccbd96fb-d538-41c6-aa98-fbd30db888df", + "id": "d38e4c12-b0be-4094-838f-474737acb9ae", "key": "trade_in", "value": "MOTOLITE", "type": "string" }, { - "id": "a12f7829-c214-405a-8966-42886a6c01cf", + "id": "7b2cfb98-c8cc-42a8-90cd-0cba4f95c49d", "key": "longitude", "value": "121.018039", "type": "string" }, { - "id": "03e74d4e-84b5-486c-a345-c6912c3b634d", + "id": "51e80736-d5d6-4bfd-9ea7-d11777924012", "key": "latitude", "value": "14.606807", "type": "string" }, { - "id": "ccc96e0c-20ed-487a-93d4-f587d5868396", + "id": "26f630f6-65d3-4d15-8541-e7fb855bcaa6", "key": "warranty", "value": "private", "type": "string" }, { - "id": "1a06bec2-ccff-470b-87c6-976c5fd45e46", + "id": "19727bd1-4fb5-4e6e-828f-f8994dac0746", "key": "mode_of_payment", "value": "CASH", "type": "string" }, { - "id": "e0f7a8aa-8641-4be4-b835-9d4e22bc9f66", + "id": "3f38ff8a-3657-416f-ba81-edba8aba0786", "key": "delivery_address", "value": "#123 Moogle Drive", "type": "string" }, { - "id": "07b61f80-1944-49e8-9fb1-ba53e138eed6", + "id": "423522ed-d679-42bf-8c2c-b2459ca90821", "key": "delivery_instructions", "value": "Look for the red bon-bon", "type": "string" }, { - "id": "49422a74-4683-4fad-80f3-fad0fe7c1674", + "id": "9771cf9f-8750-488a-a0bd-d63086cde611", "key": "promo_id", "value": "1", "type": "string" }, { - "id": "6f778734-29ec-47d3-b8c0-dc56c403408c", + "id": "43a22bdb-8b53-4afa-af73-0eb900fcc8cf", "key": "code", "value": "123456", "type": "string" }, { - "id": "4f5e4acf-511e-43e7-96aa-1bb8f92a60e3", + "id": "6f9b4bf9-a70b-48fa-9b37-93ec646e01ed", "key": "batt_id", "value": "1050", "type": "string" }, { - "id": "c43b9981-550a-40b6-b3a6-28007f8bb8a8", + "id": "e95eeff1-5999-4a94-939d-f0b317b8b85d", "key": "jo_id_for_rider_rating", "value": "4", "type": "string" }, { - "id": "436646d7-8233-493d-aada-241fe92085a8", + "id": "04c336f3-e1c7-40fb-972b-15ab693dea3f", "key": "preset_api_key", "value": "5d427428b1541", "type": "string" }, { - "id": "65fcc401-ba87-4a22-be52-9cf1c7e1ffa5", + "id": "71af4a9f-0db2-46d0-9a98-b20397690e1c", "key": "rating", "value": "4", "type": "string" }, { - "id": "d50b735d-29e3-48aa-8391-af2cc638a600", + "id": "73fe6c29-ce57-49d9-b6d7-b154b7334c0a", "key": "comment", "value": "Very professional, kupo!", "type": "string" }, { - "id": "e5790ffa-d2aa-4210-936c-9cbcddec4e87", + "id": "0fb165ee-feef-403d-b59b-1327a644ea6d", "key": "jo_id_for_cancel_jo", "value": "3", "type": "string" }, { - "id": "d5a7f058-4e54-47ac-b60b-d3595618adb1", + "id": "fb396968-a759-4964-b8be-05dc2e0c612d", "key": "cancel_reason", "value": "No money, kupo!", "type": "string" }, { - "id": "ca9ad85f-5809-42aa-afcd-89008810e6b2", + "id": "ee6dd9ed-f3e0-4a3a-bb0c-dc0403cdf98f", "key": "device_id", "value": "123456", "type": "string" }, { - "id": "6b7f078a-e509-4fb9-b99d-91c48cb26718", + "id": "60b1d451-0af1-40de-a85e-bc2d01aad073", "key": "partner_id", "value": "1", "type": "string" }, { - "id": "98abae1f-9ca4-4041-95d3-62c659fc11b7", + "id": "45487aec-b2c4-4e2a-b6c5-ed44dba9de82", "key": "preset_api_key_unconfirmed", "value": "5d439b3a43f40", "type": "string" }, { - "id": "37bddaba-3933-4895-adf9-8b2b1be68d48", + "id": "ffe45ee9-85b6-4fc4-806d-f330a72be98f", "key": "service_id", "value": "2", "type": "string" }, { - "id": "94e86dc8-2237-41b1-8fdc-8da7e1ac8331", + "id": "ffab2ad5-357e-45e4-b7d7-f27028986e22", "key": "limit", "value": "5", "type": "string" + }, + { + "id": "37d55a82-d5e7-498a-8b76-e04c1936a3ea", + "key": "wid", + "value": "185480", + "type": "string" + }, + { + "id": "e6e71ab9-7e61-47a2-8be0-5b02b85dcc5a", + "key": "privacy_policy_id", + "value": "3", + "type": "string" + }, + { + "id": "749e4f23-b5f1-478d-8927-ee38d3dbf24a", + "key": "non_existent_wid", + "value": "111111", + "type": "string" + }, + { + "id": "bf0b8bfb-bfeb-4b13-aa52-368a22771813", + "key": "non_existent_policy_id", + "value": "9999", + "type": "string" } ] } \ No newline at end of file -- 2.43.5 From 4caa2c6aaa251047e1c321cb42fd3d9c0a5758ea Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Fri, 20 Sep 2019 03:09:11 +0000 Subject: [PATCH 13/13] Update data dump and tests. #229 --- ...I - API Controller.postman_collection.json | 393 +++--------------- postman/resq_test.sql | 17 +- 2 files changed, 69 insertions(+), 341 deletions(-) diff --git a/postman/Resq Mobile API - API Controller.postman_collection.json b/postman/Resq Mobile API - API Controller.postman_collection.json index 4923ec31..f2db954b 100755 --- a/postman/Resq Mobile API - API Controller.postman_collection.json +++ b/postman/Resq Mobile API - API Controller.postman_collection.json @@ -687,7 +687,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{resq_url}}/api/vehicles?api_key={{api_key}}", + "raw": "{{resq_url}}/api/vehicles?api_key={{preset_api_key}}", "host": [ "{{resq_url}}" ], @@ -698,7 +698,7 @@ "query": [ { "key": "api_key", - "value": "{{api_key}}" + "value": "{{preset_api_key}}" } ] } @@ -720,8 +720,6 @@ "pm.test(\"List promos\", function () {", " var jsonData = pm.response.json();", " pm.expect(jsonData.error.status).to.eql(\"success\");", - " pm.expect(jsonData.data.promos).to.have.lengthOf(9);", - " pm.expect(jsonData.data.promos[0].code).to.eql(\"EMPLOY\");", "});" ], "type": "text/javascript" @@ -732,7 +730,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{resq_url}}/api/promos?api_key={{api_key}}", + "raw": "{{resq_url}}/api/promos?api_key={{preset_api_key}}", "host": [ "{{resq_url}}" ], @@ -743,7 +741,7 @@ "query": [ { "key": "api_key", - "value": "{{api_key}}" + "value": "{{preset_api_key}}" } ] } @@ -777,7 +775,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{resq_url}}/api/vehicles/{{make_id}}/compatible_batteries?api_key={{api_key}}", + "raw": "{{resq_url}}/api/vehicles/{{make_id}}/compatible_batteries?api_key={{preset_api_key}}", "host": [ "{{resq_url}}" ], @@ -790,7 +788,7 @@ "query": [ { "key": "api_key", - "value": "{{api_key}}" + "value": "{{preset_api_key}}" } ] } @@ -1807,285 +1805,6 @@ } }, "response": [] - }, - { - "name": "[Normal] Set Privacy Policy to Existing Policy", - "event": [ - { - "listen": "test", - "script": { - "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Set privacy policy\", function () {", - " var jsonData = pm.response.json();", - " pm.expect(jsonData.error.status).to.eql(\"success\");", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "privacy_policy_id", - "value": "{{privacy_policy_id}}", - "type": "text" - } - ] - }, - "url": { - "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", - "host": [ - "{{resq_url}}" - ], - "path": [ - "api", - "warranty", - "{{wid}}", - "privacy_policy" - ], - "query": [ - { - "key": "api_key", - "value": "{{preset_api_key}}" - } - ] - } - }, - "response": [] - }, - { - "name": "[Normal] Set Privacy Policy to null", - "event": [ - { - "listen": "test", - "script": { - "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Set privacy policy\", function () {", - " var jsonData = pm.response.json();", - " pm.expect(jsonData.error.status).to.eql(\"success\");", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "privacy_policy_id", - "value": "0", - "type": "text" - } - ] - }, - "url": { - "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", - "host": [ - "{{resq_url}}" - ], - "path": [ - "api", - "warranty", - "{{wid}}", - "privacy_policy" - ], - "query": [ - { - "key": "api_key", - "value": "{{preset_api_key}}" - } - ] - } - }, - "response": [] - }, - { - "name": "[Abnormal] Set Privacy Policy - Non existent privacy policy", - "event": [ - { - "listen": "test", - "script": { - "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Set privacy policy - Non existent privacy policy\", function () {", - " var jsonData = pm.response.json();", - " pm.expect(jsonData.error.status).to.eql(\"error\");", - " pm.expect(jsonData.error.message).to.eql(\"No privacy policy found.\");", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "privacy_policy_id", - "value": "{{non_existent_policy_id}}", - "type": "text" - } - ] - }, - "url": { - "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", - "host": [ - "{{resq_url}}" - ], - "path": [ - "api", - "warranty", - "{{wid}}", - "privacy_policy" - ], - "query": [ - { - "key": "api_key", - "value": "{{preset_api_key}}" - } - ] - } - }, - "response": [] - }, - { - "name": "[Abnormal] Set Privacy Policy - Non-existent warranty", - "event": [ - { - "listen": "test", - "script": { - "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Set privacy policy - Non existent warranty\", function () {", - " var jsonData = pm.response.json();", - " pm.expect(jsonData.error.status).to.eql(\"error\");", - " pm.expect(jsonData.error.message).to.eql(\"No warranty found.\");", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "privacy_policy_id", - "value": "{{privacy_policy_id}}", - "type": "text" - } - ] - }, - "url": { - "raw": "{{resq_url}}/api/warranty/{{non_existent_wid}}/privacy_policy?api_key={{preset_api_key}}", - "host": [ - "{{resq_url}}" - ], - "path": [ - "api", - "warranty", - "{{non_existent_wid}}", - "privacy_policy" - ], - "query": [ - { - "key": "api_key", - "value": "{{preset_api_key}}" - } - ] - } - }, - "response": [] - }, - { - "name": "[Abnormal] Set Privacy Policy - Missing policy ID", - "event": [ - { - "listen": "test", - "script": { - "id": "b8b714b9-9019-4c5b-ab03-ef8787fff1ac", - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Set privacy policy - missing policy ID\", function () {", - " var jsonData = pm.response.json();", - " pm.expect(jsonData.error.status).to.eql(\"error\");", - " pm.expect(jsonData.error.message).to.eql(\"Missing parameter(s): privacy_policy_id\");", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "privacy_policy_id", - "value": "{{privacy_policy_id}}", - "type": "text", - "disabled": true - } - ] - }, - "url": { - "raw": "{{resq_url}}/api/warranty/{{wid}}/privacy_policy?api_key={{preset_api_key}}", - "host": [ - "{{resq_url}}" - ], - "path": [ - "api", - "warranty", - "{{wid}}", - "privacy_policy" - ], - "query": [ - { - "key": "api_key", - "value": "{{preset_api_key}}" - } - ] - } - }, - "response": [] } ], "event": [ @@ -2112,269 +1831,273 @@ ], "variable": [ { - "id": "b1881df0-5aa2-438c-8ac5-46ccd259f2c0", + "id": "b2064915-5560-460e-bf8d-bac3b1c793ee", "key": "resq_url", "value": "resq.local", "type": "string", "disabled": true }, { - "id": "59777f63-095b-4325-a86e-f6adceb729a8", + "id": "16984ab5-557d-40fa-b3a6-9c2305a3f5ca", "key": "phone_model", "value": "iPhone8", "type": "string" }, { - "id": "fc1b400f-5d55-4471-95f1-359b75eb7a2b", + "id": "c100fd09-600a-43e3-bbe3-9abf8b7d89ea", "key": "os_type", "value": "IOS", "type": "string" }, { - "id": "aa7c948b-2de9-4691-82e7-bb6024403602", + "id": "7028140b-9728-40ef-8383-3b5aa1f36779", "key": "os_version", "value": "11.4", "type": "string" }, { - "id": "44e211e0-50f4-4903-9e21-b1527f887390", + "id": "17c36210-5171-4282-a8b9-3ad598f7c1d2", "key": "phone_id", "value": "11376660-F8BF-46ED-B30A-EF3F361EE223", "type": "string" }, { - "id": "44636d6d-4522-4ffb-a459-f05011b103a0", + "id": "68c74734-b2aa-4f59-9544-7a42f5f098e6", "key": "phone_number", "value": "9221111111", "type": "string" }, { - "id": "4eb61ece-c824-4840-8f14-ae91e34ba6cc", + "id": "307ee172-4876-4a13-ad9f-b2329baed742", "key": "first_name", "value": "Stiltzkin", "type": "string" }, { - "id": "35704451-b847-4099-b119-96c091bdf787", + "id": "5cfa47ce-5ce8-4fdc-9c64-885b3eeed2a4", "key": "last_name", "value": "Moogle", "type": "string" }, { - "id": "0cfe09d1-c6e2-40db-9f19-684ff95f8b9c", + "id": "f22464fb-e384-499f-afac-8a8c70986a9a", "key": "mfg_id", "value": "1435", "type": "string" }, { - "id": "e0b3374d-559b-48ca-8df3-b9383b54b1c8", + "id": "57b70318-9e95-4844-b8fb-4e630faf7c9f", "key": "make_id", "value": "22043", "type": "string" }, { - "id": "e462ba31-08b2-4e93-b88d-bde3d74600e1", + "id": "191c004f-e7a2-464d-a01a-89e753055778", "key": "name", "value": "Beetle 1.2 TSI MT (Gas)", "type": "string" }, { - "id": "f7b3bb29-f9e8-48bf-bb6e-160b5a99537b", + "id": "64733c08-c922-4f6a-b457-c6a6d046e7eb", "key": "plate_num", "value": "MGL1234", "type": "string" }, { - "id": "56b95327-9735-4e0b-b1b5-6e8dd2a06b57", + "id": "53e239e8-64e0-4724-8357-1830836b4d5c", "key": "model_year", "value": "2016", "type": "string" }, { - "id": "21873510-bb46-4b6d-861a-1269b3d693ec", + "id": "59cb19e6-8a2f-4724-8e10-975f00c7166d", "key": "color", "value": "White", "type": "string" }, { - "id": "ca7c31a9-a64c-44ce-bd21-ed6fb959a8fc", + "id": "81dcc9c4-d37b-43d0-913a-099f206acf45", "key": "condition", "value": "Brand New", "type": "string" }, { - "id": "916d7aad-3769-4680-8898-2f662cd84da8", + "id": "422fbab4-99c3-4a9d-9f6e-7f6239225ccc", "key": "fuel_type", "value": "Gas", "type": "string" }, { - "id": "9335b8b3-c38e-48c9-b2de-f41db10bbe33", + "id": "71730d1e-4e02-4f7e-b69f-66c9ec31a503", "key": "wty_code", "value": "MKUP0123456", "type": "string" }, { - "id": "02c4d2e7-eb4e-4812-b154-b463b5a9d862", + "id": "18d686cf-25fb-419f-9c6b-5714e4ecd50a", "key": "wty_expire", "value": "20201125", "type": "string" }, { - "id": "f8c89bf6-1aed-4664-b169-d38cf4fa564d", + "id": "76e0017d-5816-433d-ac97-9c1bd3ec9fb0", "key": "service_type", "value": "battery_new", "type": "string" }, { - "id": "d38e4c12-b0be-4094-838f-474737acb9ae", + "id": "c1778ea1-2c52-43eb-9b08-6bfe2890a06d", "key": "trade_in", "value": "MOTOLITE", "type": "string" }, { - "id": "7b2cfb98-c8cc-42a8-90cd-0cba4f95c49d", + "id": "8b29e118-092b-43a7-8c12-7df8f9632173", "key": "longitude", "value": "121.018039", "type": "string" }, { - "id": "51e80736-d5d6-4bfd-9ea7-d11777924012", + "id": "75c2c5e3-509a-42a2-b273-e57d92b2a38b", "key": "latitude", "value": "14.606807", "type": "string" }, { - "id": "26f630f6-65d3-4d15-8541-e7fb855bcaa6", + "id": "a9648000-743e-4d2a-9ab5-d6ea1aebe3fc", "key": "warranty", "value": "private", "type": "string" }, { - "id": "19727bd1-4fb5-4e6e-828f-f8994dac0746", + "id": "5cf518d2-6a8e-4531-91e5-4547edea459d", "key": "mode_of_payment", "value": "CASH", "type": "string" }, { - "id": "3f38ff8a-3657-416f-ba81-edba8aba0786", + "id": "351b1048-61f5-4be0-9726-461d6716b4e5", "key": "delivery_address", "value": "#123 Moogle Drive", "type": "string" }, { - "id": "423522ed-d679-42bf-8c2c-b2459ca90821", + "id": "a162cb94-f3c5-4746-86e6-8864e723f892", "key": "delivery_instructions", "value": "Look for the red bon-bon", "type": "string" }, { - "id": "9771cf9f-8750-488a-a0bd-d63086cde611", + "id": "98a35676-9e6a-451d-822c-9c3e64dde963", "key": "promo_id", "value": "1", "type": "string" }, { - "id": "43a22bdb-8b53-4afa-af73-0eb900fcc8cf", + "id": "e0d82901-550c-4767-85e7-60fbbc6724e3", "key": "code", "value": "123456", "type": "string" }, { - "id": "6f9b4bf9-a70b-48fa-9b37-93ec646e01ed", + "id": "fa6922c0-5ae7-435b-be43-83e6de75371c", "key": "batt_id", "value": "1050", "type": "string" }, { - "id": "e95eeff1-5999-4a94-939d-f0b317b8b85d", + "id": "9d96d6ab-2c45-4112-a982-c6f606899d83", "key": "jo_id_for_rider_rating", "value": "4", "type": "string" }, { - "id": "04c336f3-e1c7-40fb-972b-15ab693dea3f", + "id": "c93649a9-be8c-449e-8ac2-e5b705cffe70", "key": "preset_api_key", "value": "5d427428b1541", "type": "string" }, { - "id": "71af4a9f-0db2-46d0-9a98-b20397690e1c", + "id": "d57a3355-15d7-4ac5-b070-f4a8b01b8b05", "key": "rating", "value": "4", "type": "string" }, { - "id": "73fe6c29-ce57-49d9-b6d7-b154b7334c0a", + "id": "211fabd7-26f2-4a59-9b55-2ac4e39247f4", "key": "comment", "value": "Very professional, kupo!", "type": "string" }, { - "id": "0fb165ee-feef-403d-b59b-1327a644ea6d", + "id": "c1730974-6818-46fa-882d-30ecf1610189", "key": "jo_id_for_cancel_jo", "value": "3", "type": "string" }, { - "id": "fb396968-a759-4964-b8be-05dc2e0c612d", + "id": "a0714577-42a1-4b1e-ab1c-f95848bfe9dd", "key": "cancel_reason", "value": "No money, kupo!", "type": "string" }, { - "id": "ee6dd9ed-f3e0-4a3a-bb0c-dc0403cdf98f", + "id": "456daded-2d5e-4998-b5a5-fadebf54d2e8", "key": "device_id", "value": "123456", "type": "string" }, { - "id": "60b1d451-0af1-40de-a85e-bc2d01aad073", + "id": "91fec107-c5cb-4764-9bcf-67d9c023fce9", "key": "partner_id", "value": "1", "type": "string" }, { - "id": "45487aec-b2c4-4e2a-b6c5-ed44dba9de82", + "id": "e3dc715e-d0fe-438b-a843-bd27a75fe801", "key": "preset_api_key_unconfirmed", "value": "5d439b3a43f40", "type": "string" }, { - "id": "ffe45ee9-85b6-4fc4-806d-f330a72be98f", + "id": "48221f01-e34f-496c-a616-52600d893b6a", "key": "service_id", "value": "2", "type": "string" }, { - "id": "ffab2ad5-357e-45e4-b7d7-f27028986e22", + "id": "534d401c-d28e-4f4c-8158-ec442bf6134a", "key": "limit", "value": "5", "type": "string" }, { - "id": "37d55a82-d5e7-498a-8b76-e04c1936a3ea", + "id": "612f13cf-e9e5-49af-8a5c-34044b5348b7", "key": "wid", "value": "185480", - "type": "string" + "type": "string", + "disabled": true }, { - "id": "e6e71ab9-7e61-47a2-8be0-5b02b85dcc5a", + "id": "73a241f0-c243-438a-a994-d7f902057bfa", "key": "privacy_policy_id", "value": "3", - "type": "string" + "type": "string", + "disabled": true }, { - "id": "749e4f23-b5f1-478d-8927-ee38d3dbf24a", + "id": "2e28a967-f39b-4661-bf1d-38d10c999a85", "key": "non_existent_wid", "value": "111111", - "type": "string" + "type": "string", + "disabled": true }, { - "id": "bf0b8bfb-bfeb-4b13-aa52-368a22771813", + "id": "2535af91-aa1c-41e7-99fa-01166c39d877", "key": "non_existent_policy_id", "value": "9999", - "type": "string" + "type": "string", + "disabled": true } ] } \ No newline at end of file diff --git a/postman/resq_test.sql b/postman/resq_test.sql index 7818f398..11196719 100644 --- a/postman/resq_test.sql +++ b/postman/resq_test.sql @@ -2,7 +2,7 @@ -- -- Host: localhost Database: resq_test -- ------------------------------------------------------ --- Server version 10.2.22-MariaDB +-- Server version 10.2.22-MariaDB-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1131,7 +1131,7 @@ CREATE TABLE `sap_battery_brand` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1140,6 +1140,7 @@ CREATE TABLE `sap_battery_brand` ( LOCK TABLES `sap_battery_brand` WRITE; /*!40000 ALTER TABLE `sap_battery_brand` DISABLE KEYS */; +INSERT INTO `sap_battery_brand` VALUES (1,'CENTURY MARATHONER'),(2,'CHAMPION MF12'),(3,'CHAMPION PM'),(4,'SOLAR'),(5,'EFB MAZDA'),(6,'ELECTRON'),(7,'ENDURO'),(8,'EXCEL'),(9,'GOLD'),(10,'MAGIC FORCE'),(11,'MOTOLITE'),(12,'MOTOLITE ENFORCER'),(13,'MOTOLITE SUPER PREMIUM'),(14,'POWERLAST'),(15,'ROADMASTER'),(16,'TRUCKMASTER'),(17,'VALIANT'),(18,'DYNA FORCE'),(19,'DYNA POWER'),(20,'XTP-CALCIUM'),(21,'YOKOHAMA'),(22,'YUASA MERCURY'),(23,'YUASA SUPER PREMIUM MERCURY'); /*!40000 ALTER TABLE `sap_battery_brand` ENABLE KEYS */; UNLOCK TABLES; @@ -1154,7 +1155,7 @@ CREATE TABLE `sap_battery_size` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1163,6 +1164,7 @@ CREATE TABLE `sap_battery_size` ( LOCK TABLES `sap_battery_size` WRITE; /*!40000 ALTER TABLE `sap_battery_size` DISABLE KEYS */; +INSERT INTO `sap_battery_size` VALUES (1,'2SMF'),(2,'3SMF'),(3,'NS40'),(4,'NS60'),(5,'1SMF'),(6,'1SNF'),(7,'6SMF'),(8,'2D'),(9,'4D'),(10,'8D'),(11,'GC2'),(12,'GC8'),(13,'GC2-TUBULAR'),(14,'GC8-TUBULAR'),(15,'NS60 REVERSE'),(16,'DIN44'),(17,'3SMF REVERSE'),(18,'NS40 REVERSE'),(19,'D20'),(20,'G34'),(21,'DIN55H'),(22,'DIN55 H'),(23,'DIN66H'),(24,'DIN66 H'),(25,'DIN110'),(26,'G65'),(27,'DIN77H'),(28,'1SMF REVERSE'),(29,'2SMF REVERSE'),(30,'DIN55'),(31,'DIN55 REVERSE'),(32,'DIN66'),(33,'DIN66 REVERSE'),(34,'DIN77'),(35,'DIN88'),(36,'6TN'),(37,'8D LUG TYPE'),(38,'6SMF MF'),(39,'2D MF'),(40,'4D MF'),(41,'8D MF'); /*!40000 ALTER TABLE `sap_battery_size` ENABLE KEYS */; UNLOCK TABLES; @@ -1423,16 +1425,19 @@ CREATE TABLE `warranty` ( `date_expire` date DEFAULT NULL, `date_claim` date DEFAULT NULL, `flag_activated` tinyint(1) NOT NULL, + `warranty_privacy_policy` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQ_88D71CF27096A49F` (`claim_id`), UNIQUE KEY `UNIQ_88D71CF2D374C9DC` (`serial`), KEY `IDX_88D71CF24AA75DF2` (`bty_model_id`), KEY `IDX_88D71CF2987A584A` (`bty_size_id`), KEY `IDX_88D71CF2A78D0AE` (`sap_bty_id`), + KEY `IDX_88D71CF2FCDDCE73` (`warranty_privacy_policy`), CONSTRAINT `FK_88D71CF24AA75DF2` FOREIGN KEY (`bty_model_id`) REFERENCES `battery_model` (`id`), CONSTRAINT `FK_88D71CF27096A49F` FOREIGN KEY (`claim_id`) REFERENCES `warranty` (`id`), CONSTRAINT `FK_88D71CF2987A584A` FOREIGN KEY (`bty_size_id`) REFERENCES `battery_size` (`id`), - CONSTRAINT `FK_88D71CF2A78D0AE` FOREIGN KEY (`sap_bty_id`) REFERENCES `sap_battery` (`id`) + CONSTRAINT `FK_88D71CF2A78D0AE` FOREIGN KEY (`sap_bty_id`) REFERENCES `sap_battery` (`id`), + CONSTRAINT `FK_88D71CF2FCDDCE73` FOREIGN KEY (`warranty_privacy_policy`) REFERENCES `privacy_policy` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1442,7 +1447,7 @@ CREATE TABLE `warranty` ( LOCK TABLES `warranty` WRITE; /*!40000 ALTER TABLE `warranty` DISABLE KEYS */; -INSERT INTO `warranty` VALUES (0,NULL,NULL,'WMEB24CB-CPN00-LX',NULL,'AJ34LJADR12134LKJL5','private','MGL1234','Moguri','Kupo','9221111112','active','2019-07-16 01:46:48','2018-10-01','2019-10-01',NULL,0); +INSERT INTO `warranty` VALUES (0,NULL,NULL,'WMEB24CB-CPN00-LX',NULL,'AJ34LJADR12134LKJL5','private','MGL1234','Moguri','Kupo','9221111112','active','2019-07-16 01:46:48','2018-10-01','2019-10-01',NULL,0,NULL); /*!40000 ALTER TABLE `warranty` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -1455,4 +1460,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2019-08-13 3:10:12 +-- Dump completed on 2019-09-20 3:01:47 -- 2.43.5