1017 lines
45 KiB
Plaintext
1017 lines
45 KiB
Plaintext
/*
|
|
Navicat Premium Data Transfer
|
|
|
|
Source Server : khanegi
|
|
Source Server Type : MySQL
|
|
Source Server Version : 80045 (8.0.45-0ubuntu0.24.04.1)
|
|
Source Host : 91.212.174.137:3030
|
|
Source Schema : groosy
|
|
|
|
Target Server Type : MySQL
|
|
Target Server Version : 80045 (8.0.45-0ubuntu0.24.04.1)
|
|
File Encoding : 65001
|
|
|
|
Date: 10/06/2026 20:16:58
|
|
*/
|
|
|
|
SET NAMES utf8mb4;
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for addresses
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `addresses`;
|
|
CREATE TABLE `addresses` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`phone` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`address` varchar(2028) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`zip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`default_address` tinyint(1) NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`major_id` int DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for addresses_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `addresses_01/15`;
|
|
CREATE TABLE `addresses_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`phone` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`address` varchar(2028) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`zip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`default_address` tinyint(1) NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`major_id` int DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for bank_accounts
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `bank_accounts`;
|
|
CREATE TABLE `bank_accounts` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`cart_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`shaba_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`bank_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`account_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`sts` tinyint NOT NULL DEFAULT '1',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for bank_accounts_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `bank_accounts_01/15`;
|
|
CREATE TABLE `bank_accounts_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`cart_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`shaba_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`bank_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`account_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`sts` tinyint NOT NULL DEFAULT '1',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for cities
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `cities`;
|
|
CREATE TABLE `cities` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`parent_id` int unsigned DEFAULT NULL,
|
|
`has_children` tinyint(1) NOT NULL DEFAULT '0',
|
|
`level` tinyint DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for const
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `const`;
|
|
CREATE TABLE `const` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`title_fa` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for const_copy1
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `const_copy1`;
|
|
CREATE TABLE `const_copy1` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`title_fa` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for customers
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `customers`;
|
|
CREATE TABLE `customers` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`fname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`lname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`active` tinyint(1) NOT NULL DEFAULT '0',
|
|
`finger_print` tinyint(1) NOT NULL DEFAULT '0',
|
|
`mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`avatar_id` int unsigned DEFAULT NULL,
|
|
`last_seen_at` timestamp NULL DEFAULT NULL,
|
|
`default_address_id` int unsigned DEFAULT NULL,
|
|
`sts` tinyint unsigned DEFAULT NULL,
|
|
`type` tinyint NOT NULL DEFAULT '2',
|
|
`total_transaction` int NOT NULL DEFAULT '0',
|
|
`token_sms` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`orders_count` int NOT NULL DEFAULT '0',
|
|
`birth_date` timestamp NULL DEFAULT NULL,
|
|
`shop_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`phone_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`n_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`is_archive` tinyint(1) NOT NULL DEFAULT '0',
|
|
`trade_active` tinyint(1) NOT NULL DEFAULT '1',
|
|
`gram` int NOT NULL DEFAULT '0',
|
|
`is_legal` tinyint NOT NULL DEFAULT '0',
|
|
`referral_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`referral_to_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`total_referrals` int unsigned NOT NULL DEFAULT '0',
|
|
`profit_count` int NOT NULL DEFAULT '1',
|
|
`add_user_limit` int NOT NULL DEFAULT '0',
|
|
`profit_amount` float NOT NULL DEFAULT '0.01',
|
|
`profit_amount_by_lvl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`order_reward_limit` int DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`credential_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`sum_gold` decimal(10,3) DEFAULT NULL,
|
|
`gold` decimal(10,4) DEFAULT NULL,
|
|
`moshtari_code` int DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for customers_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `customers_01/15`;
|
|
CREATE TABLE `customers_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`fname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`lname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`active` tinyint(1) NOT NULL DEFAULT '0',
|
|
`finger_print` tinyint(1) NOT NULL DEFAULT '0',
|
|
`mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`avatar_id` int unsigned DEFAULT NULL,
|
|
`last_seen_at` timestamp NULL DEFAULT NULL,
|
|
`default_address_id` int unsigned DEFAULT NULL,
|
|
`sts` tinyint unsigned DEFAULT NULL,
|
|
`type` tinyint NOT NULL DEFAULT '2',
|
|
`total_transaction` int NOT NULL DEFAULT '0',
|
|
`token_sms` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`orders_count` int NOT NULL DEFAULT '0',
|
|
`birth_date` timestamp NULL DEFAULT NULL,
|
|
`shop_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`phone_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`n_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`is_archive` tinyint(1) NOT NULL DEFAULT '0',
|
|
`trade_active` tinyint(1) NOT NULL DEFAULT '1',
|
|
`gram` int NOT NULL DEFAULT '0',
|
|
`is_legal` tinyint NOT NULL DEFAULT '0',
|
|
`referral_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`referral_to_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`profit_count` int NOT NULL DEFAULT '1',
|
|
`add_user_limit` int NOT NULL DEFAULT '0',
|
|
`profit_amount` float NOT NULL DEFAULT '0.01',
|
|
`profit_amount_by_lvl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`order_reward_limit` int DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`credential_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`sum_gold` decimal(10,3) DEFAULT NULL,
|
|
`gold` decimal(10,4) DEFAULT NULL,
|
|
`moshtari_code` int DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for customers_settings
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `customers_settings`;
|
|
CREATE TABLE `customers_settings` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`agent_id` int DEFAULT NULL,
|
|
`customer_id` int DEFAULT NULL,
|
|
`product_id` int DEFAULT NULL,
|
|
`group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`lvl` int DEFAULT NULL,
|
|
`profit_buy` int DEFAULT NULL,
|
|
`profit_sell` int DEFAULT NULL,
|
|
`auto_buy` int DEFAULT NULL,
|
|
`auto_sell` int DEFAULT NULL,
|
|
`credit_buy` int DEFAULT NULL,
|
|
`credit_sell` int DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`is_active` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '1',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for failed_jobs
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `failed_jobs`;
|
|
CREATE TABLE `failed_jobs` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for files
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `files`;
|
|
CREATE TABLE `files` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`original_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`ext` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`src` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`size` int unsigned DEFAULT NULL,
|
|
`user_id` int unsigned DEFAULT NULL,
|
|
`document_id` int unsigned DEFAULT NULL,
|
|
`type` tinyint unsigned DEFAULT NULL,
|
|
`has_thumb` tinyint(1) DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for funds
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `funds`;
|
|
CREATE TABLE `funds` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`file_id` int unsigned DEFAULT NULL,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for giftcard_codes
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `giftcard_codes`;
|
|
CREATE TABLE `giftcard_codes` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`giftcard_id` int DEFAULT NULL,
|
|
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`sts` tinyint DEFAULT NULL,
|
|
`unit` tinyint DEFAULT NULL,
|
|
`amount` float DEFAULT NULL,
|
|
`assigned_to` int DEFAULT NULL,
|
|
`used_at` timestamp NULL DEFAULT NULL,
|
|
`expiry_date` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for giftcards
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `giftcards`;
|
|
CREATE TABLE `giftcards` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int DEFAULT NULL,
|
|
`count` int DEFAULT NULL,
|
|
`amount` float DEFAULT NULL,
|
|
`total` bigint DEFAULT NULL,
|
|
`unit` int DEFAULT NULL,
|
|
`unique_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`sts` tinyint DEFAULT NULL,
|
|
`expiry_date` timestamp NULL DEFAULT NULL,
|
|
`used_count` int DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`mobile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for gold_supplier
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `gold_supplier`;
|
|
CREATE TABLE `gold_supplier` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`fname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`active` tinyint(1) NOT NULL DEFAULT '1',
|
|
`mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`avatar_id` int unsigned DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for logs
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `logs`;
|
|
CREATE TABLE `logs` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`user_id` int unsigned DEFAULT NULL,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`data` longtext COLLATE utf8mb4_unicode_ci,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for messages
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `messages`;
|
|
CREATE TABLE `messages` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`sms` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`receiver` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`platforms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for migrations
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `migrations`;
|
|
CREATE TABLE `migrations` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`batch` int NOT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for offer_codes
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `offer_codes`;
|
|
CREATE TABLE `offer_codes` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`start_at` timestamp NULL DEFAULT NULL,
|
|
`end_at` timestamp NULL DEFAULT NULL,
|
|
`type` tinyint unsigned DEFAULT NULL,
|
|
`discount_percent` int unsigned DEFAULT NULL,
|
|
`discount_price` int unsigned DEFAULT NULL,
|
|
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
|
`use_only` bigint NOT NULL DEFAULT '1',
|
|
`use_count` bigint NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for orders
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `orders`;
|
|
CREATE TABLE `orders` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`provider_id` bigint unsigned DEFAULT NULL,
|
|
`price_id` bigint DEFAULT NULL,
|
|
`customer_id` bigint unsigned DEFAULT NULL,
|
|
`sts` tinyint unsigned DEFAULT NULL,
|
|
`direction` tinyint unsigned DEFAULT NULL,
|
|
`payment_sts` tinyint unsigned DEFAULT NULL,
|
|
`type` tinyint NOT NULL DEFAULT '1',
|
|
`amount` double(15,6) unsigned DEFAULT NULL,
|
|
`fee` int unsigned DEFAULT NULL,
|
|
`price` int unsigned DEFAULT NULL,
|
|
`price_original` int unsigned DEFAULT NULL,
|
|
`total_fee` int unsigned DEFAULT NULL,
|
|
`total_price` bigint unsigned DEFAULT NULL,
|
|
`total_price_montzar` decimal(20,4) DEFAULT NULL,
|
|
`total_price_liman` int DEFAULT NULL,
|
|
`total_price_original` bigint unsigned DEFAULT NULL,
|
|
`service_charge_percentage` decimal(5,4) DEFAULT '0.0000',
|
|
`service_charge_price` bigint DEFAULT '0',
|
|
`service_charge` decimal(20,8) DEFAULT '0.00000000',
|
|
`payment_amount` bigint NOT NULL DEFAULT '0',
|
|
`payment_remind` int DEFAULT '0',
|
|
`description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`pay_at` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `orders_provider_id_index` (`provider_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for orders_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `orders_01/15`;
|
|
CREATE TABLE `orders_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`price_id` bigint DEFAULT NULL,
|
|
`customer_id` bigint unsigned DEFAULT NULL,
|
|
`sts` tinyint unsigned DEFAULT NULL,
|
|
`direction` tinyint unsigned DEFAULT NULL,
|
|
`payment_sts` tinyint unsigned DEFAULT NULL,
|
|
`type` tinyint NOT NULL DEFAULT '1',
|
|
`amount` double(15,6) unsigned DEFAULT NULL,
|
|
`fee` int unsigned DEFAULT NULL,
|
|
`price` int unsigned DEFAULT NULL,
|
|
`price_original` int unsigned DEFAULT NULL,
|
|
`total_fee` int unsigned DEFAULT NULL,
|
|
`total_price` bigint unsigned DEFAULT NULL,
|
|
`total_price_liman` int DEFAULT NULL,
|
|
`total_price_original` bigint unsigned DEFAULT NULL,
|
|
`service_charge_percentage` decimal(5,4) DEFAULT '0.0000',
|
|
`service_charge_price` bigint DEFAULT '0',
|
|
`service_charge` decimal(20,8) DEFAULT '0.00000000',
|
|
`payment_amount` bigint NOT NULL DEFAULT '0',
|
|
`payment_remind` int DEFAULT '0',
|
|
`description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`pay_at` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for orders_copy1
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `orders_copy1`;
|
|
CREATE TABLE `orders_copy1` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`price_id` bigint DEFAULT NULL,
|
|
`customer_id` bigint unsigned DEFAULT NULL,
|
|
`sts` tinyint unsigned DEFAULT NULL,
|
|
`direction` tinyint unsigned DEFAULT NULL,
|
|
`payment_sts` tinyint unsigned DEFAULT NULL,
|
|
`type` tinyint NOT NULL DEFAULT '1',
|
|
`amount` double(15,6) unsigned DEFAULT NULL,
|
|
`fee` int unsigned DEFAULT NULL,
|
|
`price` int unsigned DEFAULT NULL,
|
|
`price_original` int unsigned DEFAULT NULL,
|
|
`total_fee` int unsigned DEFAULT NULL,
|
|
`total_price` bigint unsigned DEFAULT NULL,
|
|
`total_price_liman` int DEFAULT NULL,
|
|
`total_price_original` bigint unsigned DEFAULT NULL,
|
|
`service_charge_percentage` decimal(5,4) DEFAULT '0.0000',
|
|
`service_charge_price` bigint DEFAULT '0',
|
|
`service_charge` decimal(20,8) DEFAULT '0.00000000',
|
|
`payment_amount` bigint NOT NULL DEFAULT '0',
|
|
`payment_remind` int DEFAULT '0',
|
|
`description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`pay_at` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for paping_transactions
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `paping_transactions`;
|
|
CREATE TABLE `paping_transactions` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for password_resets
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `password_resets`;
|
|
CREATE TABLE `password_resets` (
|
|
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
KEY `password_resets_email_index` (`email`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for personal_access_tokens
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `personal_access_tokens`;
|
|
CREATE TABLE `personal_access_tokens` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`tokenable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`tokenable_id` bigint unsigned NOT NULL,
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`abilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`last_used_at` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
UNIQUE KEY `personal_access_tokens_token_unique` (`token`) USING BTREE,
|
|
KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for price_candles
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `price_candles`;
|
|
CREATE TABLE `price_candles` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`start` int unsigned DEFAULT NULL,
|
|
`end` int unsigned DEFAULT NULL,
|
|
`high` int unsigned DEFAULT NULL,
|
|
`low` int unsigned DEFAULT NULL,
|
|
`date_at` date DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for price_triggers
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `price_triggers`;
|
|
CREATE TABLE `price_triggers` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`customer_id` bigint unsigned NOT NULL,
|
|
`product_id` bigint unsigned DEFAULT NULL,
|
|
`target_price` bigint NOT NULL,
|
|
`price_condition` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
|
|
`action` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
|
|
`direction` tinyint(1) DEFAULT NULL,
|
|
`is_active` tinyint(1) DEFAULT '1',
|
|
`triggered_at` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for prices
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `prices`;
|
|
CREATE TABLE `prices` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`price` int unsigned DEFAULT NULL,
|
|
`date_at` date DEFAULT NULL,
|
|
`time_at` time DEFAULT NULL,
|
|
`user_id` int unsigned DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for products
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `products`;
|
|
CREATE TABLE `products` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`amount` float NOT NULL DEFAULT '1',
|
|
`metal_id` int DEFAULT NULL,
|
|
`group_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`file_id` bigint unsigned DEFAULT NULL,
|
|
`price` bigint DEFAULT '0',
|
|
`price_profit` int DEFAULT NULL,
|
|
`price_offset_percent` decimal(8,2) NOT NULL DEFAULT '0.00',
|
|
`active` tinyint(1) NOT NULL DEFAULT '1',
|
|
`show` tinyint(1) DEFAULT '1',
|
|
`show_in_assets` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'نمایش در صفحه داراییها',
|
|
`use_last_price_if_zero` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'استفاده از آخرین قیمت وقتی provider صفر است',
|
|
`open_sell` tinyint(1) NOT NULL DEFAULT '1',
|
|
`open_buy` tinyint(1) NOT NULL DEFAULT '1',
|
|
`auto_open_at` time DEFAULT NULL,
|
|
`auto_close_at` time DEFAULT NULL,
|
|
`percent_fee_buy` float DEFAULT NULL,
|
|
`order_limit_enabled` tinyint(1) NOT NULL DEFAULT '0',
|
|
`min_order_cash` bigint unsigned DEFAULT NULL,
|
|
`max_order_cash` bigint unsigned DEFAULT NULL,
|
|
`percent_fee_sell` float DEFAULT NULL,
|
|
`cash_fee_buy` int DEFAULT NULL,
|
|
`cash_fee_sell` int DEFAULT NULL,
|
|
`reading_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`bubble` tinyint NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for products_copy1
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `products_copy1`;
|
|
CREATE TABLE `products_copy1` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`amount` float NOT NULL DEFAULT '1',
|
|
`metal_id` int DEFAULT NULL,
|
|
`group_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`file_id` bigint unsigned DEFAULT NULL,
|
|
`price` bigint DEFAULT '0',
|
|
`price_profit` int DEFAULT NULL,
|
|
`active` tinyint(1) NOT NULL DEFAULT '1',
|
|
`show` tinyint(1) DEFAULT '1',
|
|
`open_sell` tinyint(1) NOT NULL DEFAULT '1',
|
|
`open_buy` tinyint(1) NOT NULL DEFAULT '1',
|
|
`auto_open_at` time DEFAULT NULL,
|
|
`auto_close_at` time DEFAULT NULL,
|
|
`percent_fee_buy` float DEFAULT NULL,
|
|
`percent_fee_sell` float DEFAULT NULL,
|
|
`cash_fee_buy` int DEFAULT NULL,
|
|
`cash_fee_sell` int DEFAULT NULL,
|
|
`reading_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`bubble` tinyint NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for settings
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `settings`;
|
|
CREATE TABLE `settings` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title_fa` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`can_edit` tinyint DEFAULT '0',
|
|
`is_exist` tinyint(1) NOT NULL DEFAULT '0',
|
|
`value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`is_active` tinyint DEFAULT NULL,
|
|
`type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`menu` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`show_to_user` tinyint(1) NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for settings_copy1
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `settings_copy1`;
|
|
CREATE TABLE `settings_copy1` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title_fa` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`can_edit` tinyint DEFAULT '0',
|
|
`is_exist` tinyint(1) NOT NULL DEFAULT '0',
|
|
`value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`description` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`is_active` tinyint DEFAULT NULL,
|
|
`type` varchar(255) DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for tahesab
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `tahesab`;
|
|
CREATE TABLE `tahesab` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int DEFAULT NULL,
|
|
`amount` float DEFAULT NULL,
|
|
`desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`order_id` int DEFAULT NULL,
|
|
`date` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`sh_factor` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`tahesab_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`tah_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`factor_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`res` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
|
`data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for tahesab_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `tahesab_01/15`;
|
|
CREATE TABLE `tahesab_01/15` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int DEFAULT NULL,
|
|
`amount` float DEFAULT NULL,
|
|
`desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`order_id` int DEFAULT NULL,
|
|
`date` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`sh_factor` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`tahesab_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
`tah_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`factor_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
`res` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
|
`data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for transaction_metas
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `transaction_metas`;
|
|
CREATE TABLE `transaction_metas` (
|
|
`transaction` bigint unsigned NOT NULL,
|
|
`order_id` bigint unsigned DEFAULT NULL,
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for transaction_metas_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `transaction_metas_01/15`;
|
|
CREATE TABLE `transaction_metas_01/15` (
|
|
`transaction` bigint unsigned NOT NULL,
|
|
`order_id` bigint unsigned DEFAULT NULL,
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for transactions
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `transactions`;
|
|
CREATE TABLE `transactions` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`wallet` bigint unsigned DEFAULT NULL,
|
|
`transaction_type` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`cash` bigint DEFAULT NULL,
|
|
`expire_at` datetime DEFAULT NULL,
|
|
`hash` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`customer_id` bigint unsigned DEFAULT NULL,
|
|
`order_id` int DEFAULT NULL,
|
|
`type` int NOT NULL,
|
|
`product_id` int DEFAULT NULL,
|
|
`fund_id` int DEFAULT NULL,
|
|
`start_at` timestamp NULL DEFAULT NULL,
|
|
`end_at` timestamp NULL DEFAULT NULL,
|
|
`gold` float DEFAULT '0',
|
|
`balance_cash` bigint DEFAULT NULL,
|
|
`balance_gold` int DEFAULT NULL,
|
|
`withdraw_id` int unsigned DEFAULT NULL,
|
|
`active` tinyint(1) DEFAULT NULL,
|
|
`number` int DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for transactions_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `transactions_01/15`;
|
|
CREATE TABLE `transactions_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`wallet` bigint unsigned DEFAULT NULL,
|
|
`transaction_type` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`cash` bigint DEFAULT NULL,
|
|
`expire_at` datetime DEFAULT NULL,
|
|
`hash` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`customer_id` bigint unsigned DEFAULT NULL,
|
|
`order_id` int DEFAULT NULL,
|
|
`type` int NOT NULL,
|
|
`product_id` int DEFAULT NULL,
|
|
`fund_id` int DEFAULT NULL,
|
|
`start_at` timestamp NULL DEFAULT NULL,
|
|
`end_at` timestamp NULL DEFAULT NULL,
|
|
`gold` float DEFAULT '0',
|
|
`balance_cash` bigint DEFAULT NULL,
|
|
`balance_gold` int DEFAULT NULL,
|
|
`withdraw_id` int unsigned DEFAULT NULL,
|
|
`active` tinyint(1) DEFAULT NULL,
|
|
`number` int DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for transactions_admins
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `transactions_admins`;
|
|
CREATE TABLE `transactions_admins` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`customer_id` bigint unsigned DEFAULT NULL,
|
|
`order_id` int DEFAULT NULL,
|
|
`customer_to_id` bigint unsigned DEFAULT NULL,
|
|
`user_id` bigint unsigned DEFAULT NULL,
|
|
`wallet` bigint unsigned DEFAULT NULL,
|
|
`transaction_id` bigint unsigned DEFAULT NULL,
|
|
`cash` bigint DEFAULT NULL,
|
|
`note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
|
`type` int NOT NULL,
|
|
`gold` float DEFAULT '0',
|
|
`balance_cash` bigint DEFAULT NULL,
|
|
`balance_gold` int DEFAULT NULL,
|
|
`withdraw_id` int unsigned DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for users
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `users`;
|
|
CREATE TABLE `users` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`fname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`lname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`active` tinyint(1) NOT NULL DEFAULT '1',
|
|
`telegram` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`send_sms` tinyint DEFAULT '1',
|
|
`mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`avatar_id` int unsigned DEFAULT NULL,
|
|
`last_seen_at` timestamp NULL DEFAULT NULL,
|
|
`sts` tinyint unsigned DEFAULT NULL,
|
|
`user_type` int unsigned DEFAULT NULL,
|
|
`token_sms` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
`remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`deleted_at` timestamp NULL DEFAULT NULL,
|
|
`gold` int DEFAULT NULL,
|
|
`bale` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for wallets
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `wallets`;
|
|
CREATE TABLE `wallets` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`owner_type` tinyint NOT NULL DEFAULT '1',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`owner` bigint NOT NULL,
|
|
`cash` bigint NOT NULL,
|
|
`hash` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`gold` float NOT NULL,
|
|
`fund_id` int DEFAULT NULL,
|
|
`product_id` int DEFAULT NULL,
|
|
`number` int NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for wallets_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `wallets_01/15`;
|
|
CREATE TABLE `wallets_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`owner_type` tinyint NOT NULL DEFAULT '1',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
`owner` bigint NOT NULL,
|
|
`cash` bigint NOT NULL,
|
|
`hash` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`gold` float NOT NULL,
|
|
`fund_id` int DEFAULT NULL,
|
|
`product_id` int DEFAULT NULL,
|
|
`number` int NOT NULL DEFAULT '0',
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for withdraws
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `withdraws`;
|
|
CREATE TABLE `withdraws` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`user_id` int unsigned DEFAULT NULL,
|
|
`cash` bigint DEFAULT NULL,
|
|
`gold` double DEFAULT NULL,
|
|
`note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`tracked_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`zify_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`date_at` timestamp NULL DEFAULT NULL,
|
|
`sts` tinyint DEFAULT NULL,
|
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`bank_account_id` bigint DEFAULT NULL,
|
|
`address_id` bigint DEFAULT NULL,
|
|
`priority` tinyint NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for withdraws_01/15
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `withdraws_01/15`;
|
|
CREATE TABLE `withdraws_01/15` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`customer_id` int unsigned DEFAULT NULL,
|
|
`user_id` int unsigned DEFAULT NULL,
|
|
`cash` bigint DEFAULT NULL,
|
|
`gold` double DEFAULT NULL,
|
|
`note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`tracked_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`zify_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`date_at` timestamp NULL DEFAULT NULL,
|
|
`sts` tinyint DEFAULT NULL,
|
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`bank_account_id` bigint DEFAULT NULL,
|
|
`address_id` bigint DEFAULT NULL,
|
|
`priority` tinyint NOT NULL DEFAULT '0',
|
|
`created_at` timestamp NULL DEFAULT NULL,
|
|
`updated_at` timestamp NULL DEFAULT NULL,
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
-- بعد از load schema، Laravel نباید دوباره mysql-schema.sql را اجرا کند
|
|
INSERT INTO `migrations` (`migration`, `batch`) VALUES
|
|
('0000_00_00_000000_baseline_schema', 1);
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|