971 lines
28 KiB
SQL
971 lines
28 KiB
SQL
-- phpMyAdmin SQL Dump
|
|
-- version 5.2.2
|
|
-- https://www.phpmyadmin.net/
|
|
--
|
|
-- Host: 127.0.0.1:3306
|
|
-- Generation Time: Jun 16, 2026 at 05:29 PM
|
|
-- Server version: 8.0.43-0ubuntu0.22.04.2
|
|
-- PHP Version: 8.1.33
|
|
|
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
START TRANSACTION;
|
|
SET time_zone = "+00:00";
|
|
|
|
|
|
/*!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 utf8mb4 */;
|
|
|
|
--
|
|
-- Database: `WalletIntaleqDB`
|
|
--
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `adminUser`
|
|
--
|
|
|
|
CREATE TABLE `adminUser` (
|
|
`id` int NOT NULL,
|
|
`device_number` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `cliq_invoices`
|
|
--
|
|
|
|
CREATE TABLE `cliq_invoices` (
|
|
`id` int NOT NULL,
|
|
`invoice_number` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`user_id` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`user_type` varchar(20) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`cliq_phone` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`status` varchar(20) COLLATE utf8mb4_general_ci DEFAULT 'pending',
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `driver`
|
|
--
|
|
|
|
CREATE TABLE `driver` (
|
|
`id` varchar(100) NOT NULL,
|
|
`phone` varchar(20) NOT NULL,
|
|
`email` varchar(255) NOT NULL,
|
|
`password` varchar(255) NOT NULL,
|
|
`gender` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'Male',
|
|
`license_type` varchar(255) DEFAULT NULL,
|
|
`national_number` varchar(255) DEFAULT NULL,
|
|
`name_arabic` varchar(255) DEFAULT NULL,
|
|
`name_english` varchar(255) DEFAULT NULL,
|
|
`issue_date` date DEFAULT NULL,
|
|
`expiry_date` date DEFAULT NULL,
|
|
`license_categories` varchar(255) DEFAULT NULL,
|
|
`address` text,
|
|
`card_id` varchar(255) DEFAULT NULL,
|
|
`occupation` varchar(255) DEFAULT NULL,
|
|
`licenseIssueDate` varchar(50) DEFAULT NULL,
|
|
`religion` varchar(255) DEFAULT NULL,
|
|
`status` varchar(20) NOT NULL DEFAULT 'notDeleted',
|
|
`birthdate` varchar(20) NOT NULL,
|
|
`site` varchar(255) NOT NULL,
|
|
`first_name` varchar(255) NOT NULL,
|
|
`last_name` varchar(255) NOT NULL,
|
|
`accountBank` varchar(55) NOT NULL DEFAULT 'yet',
|
|
`bankCode` varchar(20) NOT NULL DEFAULT 'CIB',
|
|
`education` varchar(255) DEFAULT NULL,
|
|
`employmentType` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
|
`maritalStatus` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
|
`fullNameMaritial` varchar(255) DEFAULT NULL,
|
|
`expirationDate` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `driverToken`
|
|
--
|
|
|
|
CREATE TABLE `driverToken` (
|
|
`id` int NOT NULL,
|
|
`token` varchar(255) NOT NULL,
|
|
`captain_id` varchar(255) NOT NULL,
|
|
`fingerPrint` varchar(100) NOT NULL,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `driverWallet`
|
|
--
|
|
|
|
CREATE TABLE `driverWallet` (
|
|
`id` int NOT NULL,
|
|
`driverID` varchar(100) NOT NULL,
|
|
`paymentID` varchar(200) NOT NULL,
|
|
`dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`amount` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
|
|
`paymentMethod` varchar(20) NOT NULL,
|
|
`dateUpdated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `driver_withdrawal_requests`
|
|
--
|
|
|
|
CREATE TABLE `driver_withdrawal_requests` (
|
|
`id` int NOT NULL,
|
|
`driver_id` varchar(255) NOT NULL,
|
|
`driver_name` varchar(255) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`wallet_type` varchar(50) NOT NULL,
|
|
`wallet_number` varchar(50) NOT NULL,
|
|
`status` varchar(50) NOT NULL DEFAULT 'pending',
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `ecash_transactions`
|
|
--
|
|
|
|
CREATE TABLE `ecash_transactions` (
|
|
`id` bigint UNSIGNED NOT NULL,
|
|
`order_ref` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`passenger_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
|
|
`ecash_transaction_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `ecash_transactions_driver`
|
|
--
|
|
|
|
CREATE TABLE `ecash_transactions_driver` (
|
|
`id` bigint UNSIGNED NOT NULL,
|
|
`order_ref` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`driver_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
|
|
`ecash_transaction_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `invoices_shamcash`
|
|
--
|
|
|
|
CREATE TABLE `invoices_shamcash` (
|
|
`id` int NOT NULL,
|
|
`invoice_number` int NOT NULL,
|
|
`driverID` varchar(44) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` enum('pending','processing','completed','failed') NOT NULL DEFAULT 'pending',
|
|
`transaction_id` varchar(50) DEFAULT NULL COMMENT 'رقم عملية شام كاش لمنع التكرار',
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`paid_at` datetime DEFAULT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `invoices_shamcash_passenger`
|
|
--
|
|
|
|
CREATE TABLE `invoices_shamcash_passenger` (
|
|
`id` int NOT NULL,
|
|
`invoice_number` int NOT NULL,
|
|
`passengerID` varchar(33) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` enum('pending','processing','completed','failed') NOT NULL DEFAULT 'pending',
|
|
`transaction_id` varchar(50) DEFAULT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`paid_at` datetime DEFAULT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `invoices_sms`
|
|
--
|
|
|
|
CREATE TABLE `invoices_sms` (
|
|
`id` int NOT NULL,
|
|
`invoice_number` varchar(20) NOT NULL,
|
|
`user_phone` varchar(20) NOT NULL,
|
|
`amount` decimal(10,3) NOT NULL,
|
|
`status` enum('pending','completed','failed') NOT NULL DEFAULT 'pending',
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`driverID` varchar(33) DEFAULT NULL,
|
|
`currency` varchar(8) DEFAULT 'SYP'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `invoices_sms_passenger`
|
|
--
|
|
|
|
CREATE TABLE `invoices_sms_passenger` (
|
|
`id` int NOT NULL,
|
|
`invoice_number` varchar(20) NOT NULL,
|
|
`user_phone` varchar(20) NOT NULL,
|
|
`amount` decimal(10,0) NOT NULL,
|
|
`status` enum('pending','completed','failed') NOT NULL DEFAULT 'pending',
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`passengerID` varchar(33) NOT NULL,
|
|
`currency` varchar(8) NOT NULL DEFAULT 'SYP'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `kazan`
|
|
--
|
|
|
|
CREATE TABLE `kazan` (
|
|
`id` int NOT NULL,
|
|
`country` varchar(30) NOT NULL,
|
|
`kazan` varchar(10) NOT NULL,
|
|
`comfortPrice` varchar(10) NOT NULL,
|
|
`speedPrice` varchar(10) NOT NULL,
|
|
`deliveryPrice` varchar(11) NOT NULL,
|
|
`freePrice` varchar(11) NOT NULL,
|
|
`latePrice` varchar(10) NOT NULL,
|
|
`heavyPrice` varchar(10) NOT NULL,
|
|
`adminId` varchar(100) NOT NULL,
|
|
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`naturePrice` varchar(10) NOT NULL,
|
|
`fuelPrice` varchar(6) NOT NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `mtn_invoices`
|
|
--
|
|
|
|
CREATE TABLE `mtn_invoices` (
|
|
`id` int NOT NULL,
|
|
`invoice_number` varchar(20) NOT NULL,
|
|
`user_id` varchar(50) NOT NULL,
|
|
`user_type` enum('driver','passenger') NOT NULL COMMENT 'يحدد هل المستخدم سائق أم راكب',
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`mtn_phone` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'رقم MTN الذي سيتم الدفع منه',
|
|
`status` enum('pending','completed','failed','expired') NOT NULL DEFAULT 'pending',
|
|
`mtn_transaction_id` varchar(255) DEFAULT NULL COMMENT 'معرّف العملية من طرف MTN بعد الدفع',
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `passengers`
|
|
--
|
|
|
|
CREATE TABLE `passengers` (
|
|
`id` varchar(100) NOT NULL,
|
|
`phone` varchar(15) NOT NULL,
|
|
`email` varchar(255) NOT NULL,
|
|
`password` varchar(100) NOT NULL,
|
|
`gender` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
|
`status` varchar(20) NOT NULL DEFAULT 'notDeleted',
|
|
`birthdate` varchar(44) NOT NULL,
|
|
`site` varchar(255) NOT NULL,
|
|
`first_name` varchar(255) NOT NULL,
|
|
`last_name` varchar(255) NOT NULL,
|
|
`sosPhone` varchar(33) NOT NULL DEFAULT 'sos',
|
|
`education` varchar(30) NOT NULL DEFAULT 'none',
|
|
`employmentType` varchar(30) NOT NULL DEFAULT 'none',
|
|
`maritalStatus` varchar(30) NOT NULL DEFAULT 'none',
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `passengerWallet`
|
|
--
|
|
|
|
CREATE TABLE `passengerWallet` (
|
|
`id` int NOT NULL,
|
|
`passenger_id` varchar(100) NOT NULL,
|
|
`balance` decimal(10,2) NOT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `payments`
|
|
--
|
|
|
|
CREATE TABLE `payments` (
|
|
`id` varchar(111) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`payment_method` varchar(255) NOT NULL,
|
|
`passengerID` varchar(100) NOT NULL,
|
|
`rideId` varchar(100) NOT NULL,
|
|
`driverID` varchar(100) NOT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`isGiven` varchar(20) NOT NULL DEFAULT 'waiting'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `paymentsDriverPoints`
|
|
--
|
|
|
|
CREATE TABLE `paymentsDriverPoints` (
|
|
`id` int NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`payment_method` varchar(50) NOT NULL,
|
|
`driverID` varchar(60) NOT NULL,
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `paymentsLog`
|
|
--
|
|
|
|
CREATE TABLE `paymentsLog` (
|
|
`id` int NOT NULL,
|
|
`payment_id` varchar(255) NOT NULL,
|
|
`user_id` char(40) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` tinyint NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `paymentsLogSyria`
|
|
--
|
|
|
|
CREATE TABLE `paymentsLogSyria` (
|
|
`id` int NOT NULL,
|
|
`user_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` tinyint NOT NULL DEFAULT '0',
|
|
`order_ref` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`payment_method` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'ecash',
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `paymentsLogSyriaDriver`
|
|
--
|
|
|
|
CREATE TABLE `paymentsLogSyriaDriver` (
|
|
`id` int NOT NULL,
|
|
`user_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL DEFAULT '0.00',
|
|
`status` tinyint NOT NULL DEFAULT '2',
|
|
`processed_wallet` tinyint(1) NOT NULL DEFAULT '0',
|
|
`order_ref` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`payment_method` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'ecash',
|
|
`created_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `payment_log_driver`
|
|
--
|
|
|
|
CREATE TABLE `payment_log_driver` (
|
|
`id` int NOT NULL,
|
|
`payment_id` varchar(255) NOT NULL,
|
|
`user_id` char(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`status` tinyint(1) NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `payment_tokens`
|
|
--
|
|
|
|
CREATE TABLE `payment_tokens` (
|
|
`id` int NOT NULL,
|
|
`token` varchar(255) NOT NULL,
|
|
`driverID` varchar(255) NOT NULL,
|
|
`dateCreated` datetime NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`isUsed` tinyint(1) DEFAULT '0'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `payment_tokens_passenger`
|
|
--
|
|
|
|
CREATE TABLE `payment_tokens_passenger` (
|
|
`id` int NOT NULL,
|
|
`token` varchar(255) NOT NULL,
|
|
`passengerId` varchar(255) NOT NULL,
|
|
`dateCreated` datetime NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`isUsed` tinyint(1) DEFAULT '0'
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `payout_requests`
|
|
--
|
|
|
|
CREATE TABLE `payout_requests` (
|
|
`id` int NOT NULL,
|
|
`driver_id` varchar(35) NOT NULL,
|
|
`driver_phone` varchar(20) NOT NULL,
|
|
`amount` decimal(10,2) NOT NULL,
|
|
`wallet_type` varchar(50) DEFAULT NULL,
|
|
`status` enum('pending','completed','failed') NOT NULL DEFAULT 'pending',
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`completed_at` timestamp NULL DEFAULT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `phone_verification`
|
|
--
|
|
|
|
CREATE TABLE `phone_verification` (
|
|
`id` int NOT NULL,
|
|
`phone_number` varchar(20) NOT NULL,
|
|
`driverId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'yet',
|
|
`email` varchar(50) NOT NULL DEFAULT 'yet',
|
|
`token_code` varchar(10) NOT NULL,
|
|
`expiration_time` datetime NOT NULL,
|
|
`is_verified` tinyint(1) DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `phone_verification_passenger`
|
|
--
|
|
|
|
CREATE TABLE `phone_verification_passenger` (
|
|
`id` int NOT NULL,
|
|
`phone_number` varchar(15) NOT NULL,
|
|
`token` varchar(6) NOT NULL,
|
|
`expiration_time` datetime NOT NULL,
|
|
`verified` tinyint(1) DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `raw_sms_log`
|
|
--
|
|
|
|
CREATE TABLE `raw_sms_log` (
|
|
`id` int NOT NULL,
|
|
`sender` varchar(50) NOT NULL,
|
|
`message_body` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
|
|
`status` enum('pending','processed','failed') NOT NULL DEFAULT 'pending',
|
|
`gemini_result` json DEFAULT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `siroWallet`
|
|
--
|
|
|
|
CREATE TABLE `siroWallet` (
|
|
`id` int NOT NULL,
|
|
`driverId` varchar(100) NOT NULL,
|
|
`passengerId` varchar(100) NOT NULL,
|
|
`amount` varchar(10) NOT NULL,
|
|
`paymentMethod` varchar(50) NOT NULL,
|
|
`token` varchar(100) NOT NULL,
|
|
`createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `smsSender`
|
|
--
|
|
|
|
CREATE TABLE `smsSender` (
|
|
`id` int NOT NULL,
|
|
`senderId` varchar(20) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `tokens`
|
|
--
|
|
|
|
CREATE TABLE `tokens` (
|
|
`id` int NOT NULL,
|
|
`token` varchar(333) NOT NULL,
|
|
`passengerID` varchar(111) NOT NULL,
|
|
`fingerPrint` varchar(300) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Indexes for dumped tables
|
|
--
|
|
|
|
--
|
|
-- Indexes for table `adminUser`
|
|
--
|
|
ALTER TABLE `adminUser`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `cliq_invoices`
|
|
--
|
|
ALTER TABLE `cliq_invoices`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `invoice_number` (`invoice_number`);
|
|
|
|
--
|
|
-- Indexes for table `driver`
|
|
--
|
|
ALTER TABLE `driver`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `phone` (`phone`,`email`),
|
|
ADD UNIQUE KEY `national_number` (`national_number`);
|
|
|
|
--
|
|
-- Indexes for table `driverToken`
|
|
--
|
|
ALTER TABLE `driverToken`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `driverWallet`
|
|
--
|
|
ALTER TABLE `driverWallet`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `driver_withdrawal_requests`
|
|
--
|
|
ALTER TABLE `driver_withdrawal_requests`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `ecash_transactions`
|
|
--
|
|
ALTER TABLE `ecash_transactions`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `order_ref_unique` (`order_ref`),
|
|
ADD KEY `user_id_index` (`user_id`),
|
|
ADD KEY `passenger_id_index` (`passenger_id`);
|
|
|
|
--
|
|
-- Indexes for table `ecash_transactions_driver`
|
|
--
|
|
ALTER TABLE `ecash_transactions_driver`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `order_ref_unique_driver` (`order_ref`),
|
|
ADD KEY `driver_id_index` (`driver_id`);
|
|
|
|
--
|
|
-- Indexes for table `invoices_shamcash`
|
|
--
|
|
ALTER TABLE `invoices_shamcash`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD KEY `invoice_number` (`invoice_number`),
|
|
ADD KEY `status` (`status`);
|
|
|
|
--
|
|
-- Indexes for table `invoices_shamcash_passenger`
|
|
--
|
|
ALTER TABLE `invoices_shamcash_passenger`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD KEY `invoice_number` (`invoice_number`),
|
|
ADD KEY `status` (`status`);
|
|
|
|
--
|
|
-- Indexes for table `invoices_sms`
|
|
--
|
|
ALTER TABLE `invoices_sms`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `invoice_number` (`invoice_number`),
|
|
ADD KEY `idx_user_phone` (`user_phone`),
|
|
ADD KEY `idx_status` (`status`);
|
|
|
|
--
|
|
-- Indexes for table `invoices_sms_passenger`
|
|
--
|
|
ALTER TABLE `invoices_sms_passenger`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `uniq_invoice_number_passenger` (`invoice_number`);
|
|
|
|
--
|
|
-- Indexes for table `kazan`
|
|
--
|
|
ALTER TABLE `kazan`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `mtn_invoices`
|
|
--
|
|
ALTER TABLE `mtn_invoices`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `invoice_number` (`invoice_number`),
|
|
ADD KEY `idx_user` (`user_id`,`user_type`),
|
|
ADD KEY `idx_status` (`status`);
|
|
|
|
--
|
|
-- Indexes for table `passengers`
|
|
--
|
|
ALTER TABLE `passengers`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `phone` (`phone`,`email`);
|
|
|
|
--
|
|
-- Indexes for table `passengerWallet`
|
|
--
|
|
ALTER TABLE `passengerWallet`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD KEY `passenger_id` (`passenger_id`);
|
|
|
|
--
|
|
-- Indexes for table `payments`
|
|
--
|
|
ALTER TABLE `payments`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `rideId` (`rideId`);
|
|
|
|
--
|
|
-- Indexes for table `paymentsDriverPoints`
|
|
--
|
|
ALTER TABLE `paymentsDriverPoints`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `paymentsLog`
|
|
--
|
|
ALTER TABLE `paymentsLog`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `payment_id` (`payment_id`);
|
|
|
|
--
|
|
-- Indexes for table `paymentsLogSyria`
|
|
--
|
|
ALTER TABLE `paymentsLogSyria`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `paymentsLogSyriaDriver`
|
|
--
|
|
ALTER TABLE `paymentsLogSyriaDriver`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD KEY `order_ref_index` (`order_ref`);
|
|
|
|
--
|
|
-- Indexes for table `payment_log_driver`
|
|
--
|
|
ALTER TABLE `payment_log_driver`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `payment_id` (`payment_id`);
|
|
|
|
--
|
|
-- Indexes for table `payment_tokens`
|
|
--
|
|
ALTER TABLE `payment_tokens`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `payment_tokens_passenger`
|
|
--
|
|
ALTER TABLE `payment_tokens_passenger`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `payout_requests`
|
|
--
|
|
ALTER TABLE `payout_requests`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD KEY `driver_id_status` (`driver_id`,`status`);
|
|
|
|
--
|
|
-- Indexes for table `phone_verification`
|
|
--
|
|
ALTER TABLE `phone_verification`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `phone_verification_passenger`
|
|
--
|
|
ALTER TABLE `phone_verification_passenger`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `phone_number` (`phone_number`);
|
|
|
|
--
|
|
-- Indexes for table `raw_sms_log`
|
|
--
|
|
ALTER TABLE `raw_sms_log`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `siroWallet`
|
|
--
|
|
ALTER TABLE `siroWallet`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `smsSender`
|
|
--
|
|
ALTER TABLE `smsSender`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `tokens`
|
|
--
|
|
ALTER TABLE `tokens`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `passengerID` (`passengerID`);
|
|
|
|
--
|
|
-- AUTO_INCREMENT for dumped tables
|
|
--
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `adminUser`
|
|
--
|
|
ALTER TABLE `adminUser`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `cliq_invoices`
|
|
--
|
|
ALTER TABLE `cliq_invoices`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `driverToken`
|
|
--
|
|
ALTER TABLE `driverToken`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `driverWallet`
|
|
--
|
|
ALTER TABLE `driverWallet`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `driver_withdrawal_requests`
|
|
--
|
|
ALTER TABLE `driver_withdrawal_requests`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `ecash_transactions`
|
|
--
|
|
ALTER TABLE `ecash_transactions`
|
|
MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `ecash_transactions_driver`
|
|
--
|
|
ALTER TABLE `ecash_transactions_driver`
|
|
MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `invoices_shamcash`
|
|
--
|
|
ALTER TABLE `invoices_shamcash`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `invoices_shamcash_passenger`
|
|
--
|
|
ALTER TABLE `invoices_shamcash_passenger`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `invoices_sms`
|
|
--
|
|
ALTER TABLE `invoices_sms`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `invoices_sms_passenger`
|
|
--
|
|
ALTER TABLE `invoices_sms_passenger`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `kazan`
|
|
--
|
|
ALTER TABLE `kazan`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `mtn_invoices`
|
|
--
|
|
ALTER TABLE `mtn_invoices`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `passengerWallet`
|
|
--
|
|
ALTER TABLE `passengerWallet`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `paymentsDriverPoints`
|
|
--
|
|
ALTER TABLE `paymentsDriverPoints`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `paymentsLog`
|
|
--
|
|
ALTER TABLE `paymentsLog`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `paymentsLogSyria`
|
|
--
|
|
ALTER TABLE `paymentsLogSyria`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `paymentsLogSyriaDriver`
|
|
--
|
|
ALTER TABLE `paymentsLogSyriaDriver`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `payment_log_driver`
|
|
--
|
|
ALTER TABLE `payment_log_driver`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `payment_tokens`
|
|
--
|
|
ALTER TABLE `payment_tokens`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `payment_tokens_passenger`
|
|
--
|
|
ALTER TABLE `payment_tokens_passenger`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `payout_requests`
|
|
--
|
|
ALTER TABLE `payout_requests`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `phone_verification`
|
|
--
|
|
ALTER TABLE `phone_verification`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `phone_verification_passenger`
|
|
--
|
|
ALTER TABLE `phone_verification_passenger`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `raw_sms_log`
|
|
--
|
|
ALTER TABLE `raw_sms_log`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `siroWallet`
|
|
--
|
|
ALTER TABLE `siroWallet`
|
|
ADD AUTO_INCREMENT = 1;
|
|
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `smsSender`
|
|
--
|
|
ALTER TABLE `smsSender`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `tokens`
|
|
--
|
|
ALTER TABLE `tokens`
|
|
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
|
--
|
|
-- Table structure for table `admin_audit_log`
|
|
--
|
|
|
|
CREATE TABLE `admin_audit_log` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`admin_id` varchar(150) NOT NULL,
|
|
`action` varchar(255) NOT NULL,
|
|
`table_name` varchar(255) DEFAULT NULL,
|
|
`record_id` varchar(255) DEFAULT NULL,
|
|
`details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
COMMIT;
|
|
|
|
/*!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 */;
|