1400 lines
55 KiB
SQL
1400 lines
55 KiB
SQL
-- 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
|