/*
 Navicat Premium Data Transfer

 Source Server         : cuto
 Source Server Type    : MySQL
 Source Server Version : 50628
 Source Host           : 15.164.166.185:3306
 Source Schema         : cuto_offcial

 Target Server Type    : MySQL
 Target Server Version : 50628
 File Encoding         : 65001

 Date: 27/05/2020 22:28:08
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for crm_batch_remit_log
-- ----------------------------
DROP TABLE IF EXISTS `crm_batch_remit_log`;
CREATE TABLE `crm_batch_remit_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `batch_no` bigint(20) NOT NULL COMMENT '打款批次号',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '审核人id',
  `admin_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '审核人名字',
  `admin_ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '审核人ip',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_batch_no`(`batch_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '财务打款审核日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_commission
-- ----------------------------
DROP TABLE IF EXISTS `crm_commission`;
CREATE TABLE `crm_commission`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `login` int(11) NOT NULL COMMENT 'MT4登录ID',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `forex` double NOT NULL DEFAULT 0 COMMENT 'forex每手佣金',
  `metal` double NOT NULL DEFAULT 0 COMMENT 'metal每手佣金',
  `cfd` double NOT NULL DEFAULT 0 COMMENT 'cfd',
  `gold` double NOT NULL DEFAULT 0 COMMENT '黄金',
  `silver` double NOT NULL DEFAULT 0 COMMENT '白银',
  `wy` double NOT NULL DEFAULT 0 COMMENT '外佣',
  `stock` double NOT NULL DEFAULT 0 COMMENT '股指',
  `btc` double NOT NULL DEFAULT 0 COMMENT '比特币',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `INDEX_LOGIN_MEMBER_ID`(`login`, `member_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '返佣表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_commission_log
-- ----------------------------
DROP TABLE IF EXISTS `crm_commission_log`;
CREATE TABLE `crm_commission_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `login` int(11) NOT NULL COMMENT 'MT4登录ID',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '返佣类型',
  `forex` double NOT NULL DEFAULT 0 COMMENT 'forex',
  `metal` double NOT NULL DEFAULT 0 COMMENT 'metal',
  `cfd` double NOT NULL DEFAULT 0 COMMENT 'cfd',
  `gold` double NOT NULL DEFAULT 0 COMMENT '黄金',
  `silver` double NOT NULL DEFAULT 0 COMMENT '白银',
  `wy` double NOT NULL DEFAULT 0 COMMENT '外佣',
  `stock` double NOT NULL DEFAULT 0 COMMENT '股指',
  `btc` double NOT NULL DEFAULT 0 COMMENT '比特币',
  `modify_user` int(11) NOT NULL COMMENT '操作人id',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `INDEX_LOGIN_MEMBER_ID`(`login`, `member_id`, `modify_user`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '修改返佣规则log表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_commission_record
-- ----------------------------
DROP TABLE IF EXISTS `crm_commission_record`;
CREATE TABLE `crm_commission_record`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `ib_id` bigint(20) NOT NULL COMMENT '名下代理ID',
  `ib_login` int(11) NOT NULL COMMENT '名下代理登录ID',
  `user_login` int(11) NOT NULL COMMENT '用户登录ID',
  `trade_ticket` int(11) NOT NULL COMMENT '交易ticket',
  `trade_type` tinyint(4) NOT NULL COMMENT '交易类型',
  `trade_volume` double NOT NULL COMMENT '交易额',
  `commission_rule` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'commission规则',
  `commission` decimal(20, 2) NOT NULL COMMENT '交易数',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `INDEX_IB_ID`(`ib_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '返佣明细记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_commission_ticket
-- ----------------------------
DROP TABLE IF EXISTS `crm_commission_ticket`;
CREATE TABLE `crm_commission_ticket`  (
  `ticket` int(11) NOT NULL COMMENT 'ticket',
  `type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '类型',
  PRIMARY KEY (`ticket`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '返佣ticket表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_config
-- ----------------------------
DROP TABLE IF EXISTS `crm_config`;
CREATE TABLE `crm_config`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `sys_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'CRM' COMMENT '系统名称',
  `lever` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '100,200,300,400,500,1000' COMMENT '杠杆',
  `smtp_from_mail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送邮件名称',
  `smtp_server` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送邮件服务器名称',
  `smtp_port` int(11) NOT NULL COMMENT '发送邮件端口',
  `smtp_username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '邮件发送人',
  `smtp_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '邮件发送密码',
  `smtp_is_ssl` tinyint(4) NOT NULL COMMENT '邮件发送是否ssl',
  `juhe_sms_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'juhe发短信key',
  `juhe_sms_tpl_id` int(11) NOT NULL COMMENT 'juhe发短信模板ID',
  `juhe_sms_mt4_tpl_id` int(11) NOT NULL COMMENT 'juhe发mt4短信模板ID',
  `juhe_sms_reg_tpl_id` int(11) NOT NULL COMMENT 'juhe发注册短信模板ID',
  `forex_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'forex列表',
  `cfd_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'cfd列表',
  `xag_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '白银',
  `xau_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '黄金',
  `metal_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'metal列表',
  `stock_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '股指',
  `btc_symbols` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'BTC',
  `banks` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行列表',
  `mt4_manager_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'mt4管理员IP',
  `mt4_manager_port` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'MT4开户IP 端口',
  `mt4_manager_login` int(11) NOT NULL COMMENT 'mt4管理员登录ID',
  `mt4_manager_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'mt4管理员密码',
  `mt4_groups` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'mt4组别',
  `end_his_trade_time` datetime(0) NOT NULL COMMENT '结束交易时间',
  `commission_deal_time` datetime(0) NOT NULL COMMENT 'commission时间',
  `mail_code` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '验证邮件内容',
  `mail_open` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'xtrader开户邮件内容',
  `mail_same_account` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '同名账户邮件模板',
  `mail_number` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '开启几号邮箱',
  `mail_ib_open` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'ib开户邮件内容',
  `agreement` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '协议内容',
  `mail_deposit` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '出金邮件内容',
  `mail_reject_apply` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '开户拒绝申请审核',
  `auto_deposit` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否自动入金',
  `exchangerate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
  `mail_url` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `pay_mail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付邮箱',
  `pay_mail_num` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '邮箱发送的数字',
  `mt4_pay_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'mt4出入金ip',
  `mt4_pay_port` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'mt4出入金端口',
  `mt4_master` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'mt4主字段',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统配置表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_config
-- ----------------------------
INSERT INTO `crm_config` VALUES (1, 'CRM1', '100,200,300,400,500,1000', 'do.not.reply@message.okworklife.com', 'smtp.sendcloud.net', 25, 'okworklife_develop', 'MpZSn2KllzJjvpql', 0, '1f7e9a34abd5cd3df9987c4cb2330eee', 89724, 43350, 43349, 'AUDNZD,AUDCAD,AUDCHF,AUDJPY,AUDUSD,USDCAD,CADJPY,CADCHF,CHFJPY,EURAUD,EURJPY,EURCHF,EURGBP,EURCAD,EURNZD,EURHUF,EURPLN,EURDKK,EURUSD,GBPUSD,GBPJPY,GBPAUD,GBPCAD,GBPCHF,GBPNZD,NZDUSD,NZDCAD,NZDCHF,NZDJPY,USDJPY,USDCHF,USDZAR,USDSGD,USDDKK,USDTRY,USDNOK,USDSEK,USDHUF,USDPLN,EURTRY,EURMXN,EURNOK,EURSEK,EURSGD,EURZAR,GBPHUF,GBPNOK,GBPPLN,GBPSEK,GBPSGD,GBPZAR,GBPTRY,NZDSGD,USDCZK,USDMXN,EURCZK,GBPDKK,AUDUSD.,AUDJPY.,AUDCHF.,AUDCAD.,AUDNZD.,CHFJPY.,CADCHF.,CADJPY.,EURUSD.,EURGBP.,EURJPY.,EURAUD.,EURCHF.,EURCAD.,EURNZD.,GBPUSD.,GBPJPY.,GBPAUD.,GBPCHF.,GBPCAD.,GBPNZD.,NZDUSD.,NZDJPY.,NZDCHF.,NZDCAD.,USDJPY.,USDCAD.,USDSGD.,USDCHF.,EURHUF.,EURPLN.,EURDKK.,USDDKK.,USDTRY.,USDNOK.,USDSEK.,USDHUF.,USDPLN.,EURTRY.,EURMXN.,EURNOK.,EURSEK.,EURSGD.,USDCZK.,GBPHUF.,GBPNOK.,GBPPLN.,GBPSEK.,GBPSGD.,GBPZAR.,GBPTRY.,NZDSGD.,USDMXN.,EURCZK.,GBPDKK.,EURZAR.,USDZAR.', 'USOIL,XBRUSD,USOUSD,UKOUSD', 'XAGUSD', '.XAUUSD,XAUUSD', '.XAUUSD,XAUUSD,XAGUSD', 'HK50', 'BTCUSD', '中国银行,农业银行,工商银行,建设银行,招商银行,交通银行,光大银行,平安银行,邮政储蓄,其它', '54.180.105.143:5443', '5443', 6104, 'PzKrl2n604#9Ql@', 'manager,demoforex-usd,XCBVARVIPUSD,XCBVARVIPUSD1,XCBVARVIPUSD2,XCBVARVIPUSD3,XCBVARSTDUSD,XCBVARSTDUSD1,XCBVARSTDUSD2,XCBVARSTDUSD3,XCBVARSTDTUSD,XCBFIXMIRUSD,XCBFIXMIRUSD1,XCBFIXMIRUSD2,XCBFIXMIRUSD3,XCARVARSTDUSD,XCADVARSTDUSD,XCAVARVIPUSD,XCAVARVIPUSD1,XCAVARVIPUSD2,XCAVARVIPUSD3,XCAVARSTDUSD,XCAVARSTDUSD1,XCAVARSTDUSD2,XCAVARSTDUSD3,XCAVARSTDTUSD,XCAFIXMIRUSD,XCAFIXMIRUSD1,XCAFIXMIRUSD2,XCAFIXMIRUSD3,XCAFIXGOLDUSD,XCBVARSTD1USD,XCAVARSTD1USD,XCBVARSTD3USD,XCAVARSTD3USD,XCADFIXMIRUSD,XCBVARVIPYUSD,XCBVARVIPYUSD1,XCBVARVIPYUSD2,XCBVARVIPYUSD3,XCBVARSTDYUSD,XCBVARSTDYUSD1,XCBVARSTDYUSD2,XCBVARSTDYUSD3,XCBVARSTDTYUSD,XCBFIXMIRYUSD,XCBFIXMIRYUSD1,XCBFIXMIRYUSD2,XCBFIXMIRYUSD3,XCARVARSTDYUSD,XCADVARSTDYUSD,XCAVARVIPYUSD,XCAVARVIPYUSD1,XCAVARVIPYUSD2,XCAVARVIPYUSD3,XCAVARSTDTYUSD,XCAVARSTDYUSD,XCAVARSTDYUSD1,XCAVARSTDYUSD2,XCAVARSTDYUSD3,XCAFIXMIRYUSD,XCAFIXMIRYUSD1,XCAFIXMIRYUSD2,XCAFIXMIRYUSD3,XCAFIXGOLDYUSD,XCBVARSTD1YUSD,XCAVARSTD1YUSD,XCBVARSTD3YUSD,XCAVARSTD3YUSD,XCBVARSTDMUSD,XCADFIXMIRYUSD,XCBFIXMIRMUSD,XCBVARSTDUSD5,XCAVARSTDUSD5,XCBVARSTDYUSD5,XCBVARSTD2USD,XCAVARSTD2USD,XCBVARSTD2YUSD,XCAVARSTD2YUSD,XCAVARSTDUSD05,XCAVARSTDUSD105,XCAVARSTDUSD205,XCAVARSTDUSD305,XCAFIXMIRUSD05,XCAFIXMIRUSD105,XCAFIXMIRUSD205,XCAFIXMIRUSD305,XCAVARSTDUSD505,XCBVARSTDUSD4,XCAVARSTDUSD4,XCBVARSTDYUSD4,XCAVARSTD1MUSD,XCAVARSTD2MUSD,XCAVARSTD3MUSD,XCAVARSTDTMUSD,XCAVARSTDMUSD,XCAVARSTDMUSD1,XCAVARSTDMUSD2,XCAVARSTDMUSD3,XCAVARSTDMUSD4,XCAVARSTDMUSD5,XCAVARVIPMUSD,XCAVARVIPMUSD1,XCAVARVIPMUSD2,XCAVARVIPMUSD3,XCBVARSTDM1USD,XCBVARSTDM2USD,XCBVARSTDM3USD,XCBVARSTDMTUSD,XCBVARSTDMUSD1,XCBVARSTDMUSD2,XCBVARSTDMUSD3,XCBVARSTDMUSD4,XCBVARSTDMUSD5,XCBVARVIPMUSD,XCBVARVIPMUSD1,XCBVARVIPMUSD2,XCBVARVIPMUSD3,XCAFIXMIRMUSD,XCBFIXMIRMUSD1,XCBFIXMIRMUSD2,XCBFIXMIRMUSD3,XCAFIXMIRUSD5,XCAFIXMIRMUSD5,XCAFIXMIRYUSD5,XCBFIXMIRUSD5,XCBFIXMIRMUSD5,XCBVARSTDUSDL5,XCBVARSTDYUSDL5,XCAVARSTDUSDL5,XCBVARSTD5USD,XCBVARSTD5YUSD,XCBVARSTDM5USD,XCBVARSTDK1USD,XCBVARSTDF1USD,XCBVARSTDK2USD,XCBVARSTDF2USD,XCBVARSTDK3USD,XCBVARSTDF3USD,XCBVARSTDK5USD,XCBVARSTDF5USD,XCBVARSTDKTUSD,XCBVARSTDFTUSD,XCBVARSTDKUSD,XCBVARSTDFUSD,XCBVARSTDKUSD1,XCBVARSTDFUSD1,XCBVARSTDKUSD2,XCBVARSTDFUSD2,XCBVARSTDKUSD3,XCBVARSTDFUSD3,XCBVARSTDKUSD4,XCBVARSTDFUSD4,XCBVARSTDKUSD5,XCBVARSTDFUSD5,XCBVARSTDKUSDL5,XCBVARSTDFUSDL5,XCBVARSTD4USD,XCBVARSTDY4USD,XCBVARSTDF4USD,XCBVARSTDK4USD,XCBVARSTDM4USD,XCBVARSTDCUSD,XCBVARSTDLDUSD,XCBVARTDHSUSD,XCBVARTDHSYUSD,XCBVARTDHSMUSD,XCBVARTDHSFUSD,XCBVARTDHSKUSD,XCBVARTDHSUSD5,XCBVARTDHSYUSD5,XCBVARTDHSMUSD5,XCBVARTDHSFUSD5,XCBVARTDHSKUSD5', '2017-07-19 00:00:00', '2018-01-18 00:00:00', '<p>\r\n	<span style=\"font-size:14px;\">Hi：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为${code}，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '<p>\r\n	<img src=\"http://system.xcoq.com/upload/aike_logo_128_35 透明.gif\" alt=\"\" /> \r\n</p>\r\n<p>\r\n	<u> </u> \r\n</p>\r\n<p>\r\n	<span style=\"font-family:\" font-size:14px;\"=\"\"><span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">亲爱的normand用户${name}</span><br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">您好，感谢您选择normand。</span><br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">阁下的normand账户已创建成功，账户信息如下：</span><br />\r\n<br />\r\n<br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">个人后台登陆信息： </span></span> \r\n</p>\r\n<p>\r\n	<span style=\"font-family:\" font-size:14px;\"=\"\">登录网址：http://crm.normandmkt.com/user/dashboard<br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">用户名:${email} </span><br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">密码:${xTradePwd}</span><br />\r\n<br />\r\n<br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">MT4账户信息：</span><br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">MT4账号:${mt4Login}</span><br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">MT4登录密码:${mt4LoginPwd}</span><br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">MT4观摩密码:${mt4ViewPwd}</span><br />\r\n<br />\r\n<br />\r\n<span style=\"font-family: \" times=\"\" new=\"\" roman\";=\"\" font-size:=\"\" 14px;\"=\"\" font-size:14px;\"=\"\">请妥善保管您的账户信息，于首次登陆后尽快修改密码。</span></span> \r\n</p>\r\n<p>\r\n	<span style=\"font-family:\" font-size:14px;\"=\"\"><span><span style=\"font-size:14px;\"><br />\r\n</span></span></span> \r\n</p>\r\n<p>\r\n	<span style=\"font-family:\" font-size:14px;\"=\"\"><span><span style=\"font-size:14px;\"><span style=\"font-family:\" font-size:14px;\"=\"\">如您在使用过程中有任何疑问请及时与我们取得联系!</span><br />\r\n<span style=\"font-family:\" font-size:14px;\"=\"\">E-Mail：admin@normandmkt.com</span><br />\r\n<br />\r\n<br />\r\n<br />\r\n</span></span></span> \r\n</p>\r\n<p>\r\n	<span style=\"font-family:\" font-size:14px;\"=\"\"><span style=\"font-family:\" font-size:14px;\"=\"\"></span><br />\r\n</span> \r\n</p>\r\n<p>\r\n	<br />\r\n</p>\r\n<p>\r\n	<span><span style=\"font-size:14px;\"><br />\r\n</span></span> \r\n</p>\r\n<p>\r\n	<br />\r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"></span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:16px;color:#666666;\"></span> \r\n</p>', '<p>1111</p>', '4', '<p>\r\n	尊敬的${name}阁下：<br />\r\n<br />\r\n&emsp;&emsp;恭喜您！当您收到这封邮件时，您已经成为了normand的准代理商，我们已经为您开通了专属管理后台。您将会拥有X Broker管理系，（代理商管理后台，可用于了解所有名下客户的账户情况及提取佣金）。在收到此封邮件后您就可以使用专属的开户链接及代理链接开发客户了，阁下的代理商管理系统账户登录信息如下：<br />\r\n<br />\r\n<br />\r\n<br />\r\nX Broker后台管理系统登录地址：http://crm.normandmkt.com/ibLogin<br />\r\n<br />\r\n登录帐号：${email}<br />\r\n<br />\r\n登录密码：${xBrokerPwd}<br />\r\n<br />\r\n专属开设直客链接：http://crm.normandmkt.com/account/open?login=${login}<br />\r\n<br />\r\n专属开设代理链接：http://crm.normandmkt.com/account/ib-open-index?login=${login}<br />\r\n<br />\r\n<br />\r\n<br />\r\n为确保您的账户安全，normand建议您于首次登陆后尽快修改初始密码，祝您在normand交易愉快！<br />\r\n<br />\r\n<br />\r\n<br />\r\n<br />\r\n<br />\r\nnormand<br />\r\n<br />\r\nE-Mail：admin@normandmkt.com<br />\r\n<br />\r\n<br />\r\n<br />\r\n<br />\r\n注意：<br />\r\n<br />\r\n保证金外汇/差价合约交易涉及高风险，极有可能导致阁下蒙受全部存入资金的损失，因此未必适合阁下。杠杆作用可能会不利于您。切勿将阁下无法承受损失的资金用于投机。请注意及完全了解所有市场及交易相关的风险。务请仔细考虑阁下的财务状况及经验水平。倘若阁下决定交易由normand所提供的产品，阁下必须先阅读及明白我们的风险披露及产品说明。normand可能会提供并非拟作投资建议且不得被诠释为投资建议的一般评论。请向独立财务顾问寻求意见。normand对于数据错误、不准确或遗漏概不承担法律责任，并且不保证其中所载信息、文字、图表、连接或其他项目准确或完整。请于采取进一步行动前先阅读及了解normand网站上的相关说明。<br />\r\n<br />\r\n此为中文译本，仅供参考用途。若此译本在解释上与英文本有任何抵触或歧义，概以英文本为准。<br />\r\n</p>', '<p>\r\n	11122\r\n</p>', '<p>\r\n	<br />\r\n</p>\r\n<p>\r\n	<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">尊敬的${name}：</span><br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">您好，感谢您选择normand，您申请的入金申请已经成功到账，请登录MT4交易账户查阅资金变动情况，到账后即可进行正常购买。</span><br />\r\n<br />\r\n<br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">客户姓名：${name}</span><br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">MT4 账号：${login}</span><br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">存款金额：$${usd}/￥${rmb}</span><br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">当前汇率：${rate} </span><br />\r\n<br />\r\n<br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">如在使用过程中遇到任何疑问，请及时与我们的客服专员联系，我们将竭诚为您提供最优质的服务！</span><br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">E-mail:admin@nromandmkt.com</span><br />\r\n<br />\r\n<br />\r\n<br />\r\n<span style=\"font-size: 14px; font-family: \" times=\"\" new=\"\" roman\";\"=\"\" font-size:14px;\"=\"\">诚挚的问候！</span> \r\n</p>\r\n<div>\r\n	<br />\r\n</div>\r\n<p>\r\n	<br />\r\n</p>\r\n<p>\r\n	<br />\r\n</p>', '<p>\r\n	亲爱的normand用户${name}<br />\r\n您好，感谢您选择normand，阁下提交的开户资料不符合，审核失败。<br />\r\n<br />\r\n<br />\r\n如您在使用过程中有任何疑问请及时与我们取得联系!<br />\r\nE-Mail：admin@normandmkt.com\r\n</p>\r\n<div>\r\n	<br />\r\n</div>\r\n<p>\r\n	<br />\r\n</p>', 1, '7.74', '<p>\r\n	尊敬的客户：\r\n</p>\r\n<p>\r\n	您的订单地址为${payurl}\r\n</p>\r\n<p>\r\n	登录账号：${name}\r\n</p>\r\n<p>\r\n	登录密码：${password}\r\n</p>\r\n<p>\r\n	请打开完成订单,重要信息请勿泄露给他人.\r\n</p>', '', '0', '13.124.30.31', '10000', 'passwordnmd');

-- ----------------------------
-- Table structure for crm_deposit
-- ----------------------------
DROP TABLE IF EXISTS `crm_deposit`;
CREATE TABLE `crm_deposit`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '入金类型',
  `order_sn` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '支付订单号',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `amount` decimal(20, 2) NOT NULL COMMENT '金额',
  `rmb` decimal(20, 2) NOT NULL COMMENT '人民币数',
  `rate` decimal(20, 3) NOT NULL COMMENT '汇率',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  `pay_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '支付方式',
  `login` int(11) NOT NULL COMMENT '登录ID',
  `mt4_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'MT4入金状态',
  `admin_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作人',
  `recharge_id` int(11) NOT NULL DEFAULT 0 COMMENT '充值记录id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13310 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '入金明细表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_deposit
-- ----------------------------
INSERT INTO `crm_deposit` VALUES (13239, 0, '201911170735099793', 84560, 100.61, 688.17, 6.840, NULL, 2018081668, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13240, 0, '201911170735323195', 84560, 100.04, 684.27, 6.840, NULL, 2018103972, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13241, 0, '201911170735421776', 84560, 100.38, 686.60, 6.840, NULL, 2018113954, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13242, 0, '201911170737519438', 84560, 100.40, 686.74, 6.840, NULL, 2018243591, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13243, 0, '201911170738049840', 84560, 100.48, 687.28, 6.840, NULL, 2018256849, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13244, 0, '201911170738552863', 84560, 100.69, 688.72, 6.840, NULL, 2018307438, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13245, 0, '201911170739481615', 84560, 100.26, 685.78, 6.840, NULL, 2018360716, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13246, 0, '201911170741541684', 84560, 100.46, 687.15, 6.840, NULL, 2018486698, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13247, 0, '201911170743104627', 84560, 100.61, 688.17, 6.840, NULL, 2018562163, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13248, 0, '201911170744043244', 84560, 100.46, 687.15, 6.840, NULL, 2018616820, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13249, 0, '201911170745197117', 84560, 100.02, 684.14, 6.840, NULL, 2018691207, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13250, 0, '201911170745442565', 84560, 100.16, 685.09, 6.840, NULL, 2018716705, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13251, 0, '201911170751232135', 84560, 100.46, 687.15, 6.840, NULL, 2019055142, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13252, 0, '201911170754365590', 84560, 100.19, 685.30, 6.840, NULL, 2019248053, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13253, 0, '201911170755465590', 84560, 100.05, 684.34, 6.840, NULL, 2019318194, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13254, 0, '201911170756329922', 84560, 100.51, 687.49, 6.840, NULL, 2019363990, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13255, 0, '201911170756459394', 84560, 100.50, 687.42, 6.840, NULL, 2019377371, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13256, 0, '201911170800462997', 84560, 100.11, 684.75, 6.840, NULL, 2019618174, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13257, 0, '201911170802117932', 84560, 100.62, 688.24, 6.840, NULL, 2019703458, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13258, 0, '201911170803571600', 84560, 100.09, 684.62, 6.840, NULL, 2019808883, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13259, 0, '201911170805351416', 84560, 100.53, 687.63, 6.840, NULL, 2019907646, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13260, 0, '201911170805582574', 84560, 100.69, 688.72, 6.840, NULL, 2019930426, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13261, 0, '201911170806502188', 84560, 100.47, 687.21, 6.840, NULL, 2019982090, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13262, 0, '201911170810159118', 84560, 100.25, 685.71, 6.840, NULL, 2020187559, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13263, 0, '201911170811172154', 84560, 100.57, 687.90, 6.840, NULL, 2020249351, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13264, 0, '201911170812434475', 84560, 100.45, 687.08, 6.840, NULL, 2020335581, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13265, 0, '201911170813505691', 84560, 100.53, 687.63, 6.840, NULL, 2020402786, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13266, 0, '201911170814226532', 84560, 100.26, 685.78, 6.840, NULL, 2020434323, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13267, 0, '201911170815202575', 84560, 100.60, 688.10, 6.840, NULL, 2020492585, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13268, 0, '201911170815429703', 84560, 100.51, 687.49, 6.840, NULL, 2020513884, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13269, 0, '201911170817502446', 84560, 100.39, 686.67, 6.840, NULL, 2020641963, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13270, 0, '201911170819268713', 84560, 100.39, 686.67, 6.840, NULL, 2020738556, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13271, 0, '201911170820125987', 84560, 100.56, 687.83, 6.840, NULL, 2020783845, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13272, 0, '201911170820411496', 84560, 100.50, 687.42, 6.840, NULL, 2020813420, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13273, 0, '201911170821073147', 84560, 100.64, 688.38, 6.840, NULL, 2020839313, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13274, 0, '201911170823316547', 84560, 100.19, 685.30, 6.840, NULL, 2020982956, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13275, 0, '201911170823446085', 84560, 100.07, 684.48, 6.840, NULL, 2020995991, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13276, 0, '201911170825135512', 84560, 100.21, 685.44, 6.840, NULL, 2021084967, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13277, 0, '201911170825293710', 84560, 100.16, 685.09, 6.840, NULL, 2021101046, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13278, 0, '201911170826348328', 84560, 100.46, 687.15, 6.840, NULL, 2021166655, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13279, 0, '201911170830003427', 84560, 100.34, 686.33, 6.840, NULL, 2021372765, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13280, 0, '201911170830262175', 84560, 100.14, 684.96, 6.840, NULL, 2021398429, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13281, 0, '201911170831059075', 84560, 100.66, 688.51, 6.840, NULL, 2021437612, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13282, 0, '201911170831181655', 84560, 100.43, 686.94, 6.840, NULL, 2021450313, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13283, 0, '201911170834593455', 84560, 100.37, 686.53, 6.840, NULL, 2021670904, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13284, 0, '201911170835359275', 84560, 100.62, 688.24, 6.840, NULL, 2021707211, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13285, 0, '201911170835421987', 84560, 100.06, 684.41, 6.840, NULL, 2021714434, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13286, 0, '201911170835496041', 84560, 100.69, 688.72, 6.840, NULL, 2021720952, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13287, 0, '201911170838414668', 84560, 100.35, 686.39, 6.840, NULL, 2021893457, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13288, 0, '201911170838559510', 84560, 100.53, 687.63, 6.840, NULL, 2021907106, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13289, 0, '201911170839135278', 84560, 100.43, 686.94, 6.840, NULL, 2021925711, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13290, 0, '201911170840067840', 84560, 100.20, 685.37, 6.840, NULL, 2021978070, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13291, 0, '201911170840237789', 84560, 100.52, 687.56, 6.840, NULL, 2021994917, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13292, 0, '201911170840336739', 84560, 100.55, 687.76, 6.840, NULL, 2022005412, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13293, 0, '201911170842318783', 84560, 100.41, 686.80, 6.840, NULL, 2022123501, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13294, 0, '201911170842457623', 84560, 100.14, 684.96, 6.840, NULL, 2022136958, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13295, 0, '201911170842528528', 84560, 100.64, 688.38, 6.840, NULL, 2022144667, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13296, 0, '201911170844175912', 84560, 100.19, 685.30, 6.840, NULL, 2022229797, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13297, 0, '201911170847328752', 84560, 100.53, 687.63, 6.840, NULL, 2022424626, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13298, 0, '201911170851437594', 84560, 100.43, 686.94, 6.840, NULL, 2022675618, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13299, 0, '201911170853198855', 84560, 100.70, 688.79, 6.840, NULL, 2022771573, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13300, 0, '201911170853307874', 84560, 100.26, 685.78, 6.840, NULL, 2022782064, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13301, 0, '201911170853365382', 84560, 100.09, 684.62, 6.840, NULL, 2022788747, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13302, 0, '201911170853587900', 84560, 100.05, 684.34, 6.840, NULL, 2022810619, '对私支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13303, 0, '201911170859503239', 84560, 100.32, 686.19, 6.840, NULL, 2023162699, '对公支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13304, 0, '201911170900309903', 84560, 100.16, 685.09, 6.840, NULL, 2023202049, '对公支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13305, 0, '201911170901301272', 84560, 100.18, 685.23, 6.840, NULL, 2023262805, '对公支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13306, 0, '201911170901545431', 84560, 100.22, 685.50, 6.840, NULL, 2023286121, '对公支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13307, 0, '201911170902011187', 84560, 100.14, 684.96, 6.840, NULL, 2023293844, '对公支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13308, 0, '201911170902085651', 84560, 100.28, 685.92, 6.840, NULL, 2023299953, '对公支付', 601, 0, '', 0);
INSERT INTO `crm_deposit` VALUES (13309, 0, '201911170902258599', 84560, 100.26, 685.78, 6.840, NULL, 2023316984, '对公支付', 601, 0, '', 0);

-- ----------------------------
-- Table structure for crm_deposit_config
-- ----------------------------
DROP TABLE IF EXISTS `crm_deposit_config`;
CREATE TABLE `crm_deposit_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `config_data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '配置数据',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_deposit_config
-- ----------------------------
INSERT INTO `crm_deposit_config` VALUES (1, '{\"10\":{\"id\":10,\"label\":\"OTC支付\",\"enable\":0},\"11\":{\"id\":11,\"label\":\"银联支付A\",\"enable\":0},\"12\":{\"id\":12,\"label\":\"银联支付B\",\"enable\":0},\"13\":{\"id\":13,\"label\":\"银联支付C\",\"enable\":0},\"14\":{\"id\":14,\"label\":\"JD通道A\",\"enable\":0},\"15\":{\"id\":15,\"label\":\"eagle\",\"enable\":0},\"16\":{\"id\":16,\"label\":\"对私支付\",\"enable\":1},\"17\":{\"id\":17,\"label\":\"对公支付\",\"enable\":1},\"18\":{\"id\":18,\"label\":\"globalpay\",\"enable\":0},\"19\":{\"id\":19,\"label\":\"payplat支付\",\"enable\":0}}');

-- ----------------------------
-- Table structure for crm_ib_open_record
-- ----------------------------
DROP TABLE IF EXISTS `crm_ib_open_record`;
CREATE TABLE `crm_ib_open_record`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `ref_id` int(11) NOT NULL COMMENT '上级代理ID',
  `open_id` int(11) NOT NULL COMMENT '申请开户ID',
  `bank_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行名称',
  `bank_province` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在省 ',
  `bank_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在市',
  `bank_district` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行所在区',
  `bank_branch` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行支行',
  `bank_card_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行卡号',
  `collect_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收款人姓名',
  `bank_swift_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行swift代码',
  `in_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '创建时间',
  `btc` double NOT NULL DEFAULT 0 COMMENT 'BTC',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `INDEX_OPEN_ID`(`open_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci COMMENT = '代理商开户附属表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_ib_open_record
-- ----------------------------
INSERT INTO `crm_ib_open_record` VALUES (1, 84560, 1, '', '', '', '', '', '', '银行卡', '', 1562310259735, 0);
INSERT INTO `crm_ib_open_record` VALUES (2, 84560, 2, '', '', '', '', '', '', '韩博识', '', 1562311610391, 0);
INSERT INTO `crm_ib_open_record` VALUES (3, 6, 3, '', '', '', '', '', '', 'test', '', 1562394673286, 0);
INSERT INTO `crm_ib_open_record` VALUES (4, 84560, 4, '', '', '', '', '', '', '韩博识', '', 1562487108316, 0);

-- ----------------------------
-- Table structure for crm_logs
-- ----------------------------
DROP TABLE IF EXISTS `crm_logs`;
CREATE TABLE `crm_logs`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `admin_id` bigint(20) NULL DEFAULT NULL COMMENT '管理员ID',
  `member_id` bigint(20) NULL DEFAULT NULL COMMENT 'memberID',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `memo_obj` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注对象',
  `date` datetime(0) NULL DEFAULT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_mail
-- ----------------------------
DROP TABLE IF EXISTS `crm_mail`;
CREATE TABLE `crm_mail`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '类型（0:会员；1:代理商；2:会员+代理商；3：自定义）',
  `subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `state` tinyint(4) NOT NULL COMMENT '是否发送（0：未发送；1：已发送）',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  `other` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义类型（邮件列表）',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮件模板表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_mail
-- ----------------------------
INSERT INTO `crm_mail` VALUES (2, 3, 'test', 'test', 1, 1560997079818, '649676852@qq.com');

-- ----------------------------
-- Table structure for crm_mail_config
-- ----------------------------
DROP TABLE IF EXISTS `crm_mail_config`;
CREATE TABLE `crm_mail_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `send_mail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ' ' COMMENT '发件人名称',
  `smtp_username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ' ' COMMENT 'smtp用户名',
  `host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ' ' COMMENT 'smtp服务域名',
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ' ' COMMENT '密码',
  `port` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '端口',
  `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
  `is_enable` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否启用，0-启用，1-不启用',
  `is_check` int(11) NOT NULL DEFAULT 0 COMMENT '选中优先级',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮箱配置表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of crm_mail_config
-- ----------------------------
INSERT INTO `crm_mail_config` VALUES (4, 'admin@notify4-online.com', 'admin@notify4-online.com', 'hwsmtp4.exmail.qq.com', 'Notifk99', '4650', 1561021740, 1, 300);
INSERT INTO `crm_mail_config` VALUES (3, 'admin@notify3-online.com', 'admin@notify3-online.com', 'hwsmtp3.exmail.qq.com', 'Notifk99', '4650', 1561022429, 0, 400);
INSERT INTO `crm_mail_config` VALUES (5, 'info1@noryataimkt.com', 'info1@noryataimkt.com', 'smtp.zoho.com', 'Oldt12345.', '465', 1561035788, 1, 100);
INSERT INTO `crm_mail_config` VALUES (6, 'info2@noryataimkt.com', 'info2@noryataimkt.com', 'smtp.zoho.com', 'Oldt12345.', '465', 1561035788, 1, 200);
INSERT INTO `crm_mail_config` VALUES (1, 'admin@notify-online.com', 'admin@notify-online.com', 'hwsmtp1.exmail.qq.com', 'Notifk99', '4650', 1561035788, 1, 800);
INSERT INTO `crm_mail_config` VALUES (2, 'admin@notify2-online.com', 'admin@notify2-online.com', 'hwsmtp2.exmail.qq.com', 'Notifk99', '4650', 1561036000, 1, 700);

-- ----------------------------
-- Table structure for crm_mail_record
-- ----------------------------
DROP TABLE IF EXISTS `crm_mail_record`;
CREATE TABLE `crm_mail_record`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `subject` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `receiver` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '接收人邮件',
  `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '发送状态(0：未发送；1:已发送)',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  `mail_num` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '邮箱编号',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `INDEX_STATUS`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '发送邮件记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_mail_record
-- ----------------------------
INSERT INTO `crm_mail_record` VALUES (1, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为157261，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '2159915754@qq.com', 1, 1562310035494, '2');
INSERT INTO `crm_mail_record` VALUES (2, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为688639，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '2159915754@qq.com', 1, 1562311462183, '2');
INSERT INTO `crm_mail_record` VALUES (3, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为630960，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '649676852@qq.com', 1, 1562328719700, '2');
INSERT INTO `crm_mail_record` VALUES (4, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为663834，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '649676852@qq.com', 1, 1562336315108, '2');
INSERT INTO `crm_mail_record` VALUES (5, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为894421，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '649676852@qq.com', 1, 1562391801162, '2');
INSERT INTO `crm_mail_record` VALUES (6, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为896957，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '649676852@qq.com', 1, 1562394156808, '7');
INSERT INTO `crm_mail_record` VALUES (7, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">normandm：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为003837，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '649676852@qq.com', 1, 1562394643183, '7');
INSERT INTO `crm_mail_record` VALUES (8, '邮箱验证码', '<p>\r\n	<span style=\"font-size:14px;\">Hi：</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\">您的邮件验证码为364414，请在页面填写验证码完成验证【请谨慎保密】</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;font-family:;\"> </span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;color:#E53333;\">开户审核会审核邮件回复的证件的后八位是否和身份证匹配. 以确保该邮箱是开户人本人使用.否则审核不通过.</span> \r\n</p>\r\n<p>\r\n	<span style=\"font-size:14px;\"><span style=\"color:#E53333;\">示例:回复邮件 正文</span><span style=\"color:#E53333;\">\"证件的后8位，以便确认是本人开户</span><span style=\"color:#E53333;\">\"</span></span> \r\n</p>\r\n<br />\r\n<p>\r\n	<br />\r\n</p>', '2159915754@qq.com', 1, 1562487069959, '7');

-- ----------------------------
-- Table structure for crm_member
-- ----------------------------
DROP TABLE IF EXISTS `crm_member`;
CREATE TABLE `crm_member`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '会员类型（1：xtrader用户；2：ib用户；99：管理员）',
  `is_enable` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否可用（0：禁用；1：可用）',
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户账号',
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户密码',
  `ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'IP',
  `logins` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'MT4 login account',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名字',
  `gender` tinyint(4) NULL DEFAULT 0 COMMENT '性别（0：女；1：男）',
  `id_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身份证号码',
  `birthday` datetime(0) NULL DEFAULT NULL COMMENT '生日',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址',
  `mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话',
  `main_login` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主登录ID',
  `random_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mt4账户初始密码code',
  `random_code_time` bigint(20) NULL DEFAULT NULL COMMENT '初始code创建时间',
  `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像地址',
  `ref_id` bigint(20) NULL DEFAULT NULL COMMENT '代理ID',
  `ref_path` varchar(3000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '代理ID层级关系',
  `in_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '创建时间',
  `ib_old_login_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'old_ib登录账户',
  `group_sn` int(6) NOT NULL DEFAULT 1 COMMENT 'MT4开户编号',
  `is_delete` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除 0 否 1 是',
  `address1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'USDT钱包地址',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `INDEX_REF_ID`(`ref_id`) USING BTREE,
  INDEX `INDEX_REF_PATH`(`ref_path`(255)) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 84561 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户member表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_member
-- ----------------------------
INSERT INTO `crm_member` VALUES (1, 99, 1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', '61.6.94.14', NULL, '管理员', NULL, NULL, NULL, NULL, '13800138000', NULL, NULL, NULL, '/upload/avatar-2.jpg', NULL, NULL, 1513848070669, NULL, 1, 1, '');
INSERT INTO `crm_member` VALUES (6, 2, 1, '13809664911@139.com', 'e10adc3949ba59abbe56e057f20f883e', '119.123.124.59', '600', '李志朋', 1, NULL, '2015-01-06 00:00:00', '广东惠州', '', '624262', NULL, NULL, NULL, 75, '70,75,', 1422076704000, 'wcs1411', 1, 1, '');
INSERT INTO `crm_member` VALUES (84555, 99, 1, 'admin-01', 'e10adc3949ba59abbe56e057f20f883e', '171.6.242.41', NULL, '客服主管', 0, NULL, NULL, NULL, '13600000000', NULL, NULL, NULL, NULL, NULL, NULL, 1562242561039, NULL, 1, 0, '');
INSERT INTO `crm_member` VALUES (84556, 99, 1, 'admin-02', 'e10adc3949ba59abbe56e057f20f883e', '110.168.249.76', NULL, '客服', 0, NULL, NULL, NULL, '13200000000', NULL, NULL, NULL, NULL, NULL, NULL, 1562242816893, NULL, 1, 0, '');
INSERT INTO `crm_member` VALUES (84557, 99, 1, 'admin-03', 'e10adc3949ba59abbe56e057f20f883e', '110.168.249.76', NULL, '客服', 0, NULL, NULL, NULL, '13500000000', NULL, NULL, NULL, NULL, NULL, NULL, 1562242846718, NULL, 1, 0, '');
INSERT INTO `crm_member` VALUES (84558, 99, 1, 'admin-04', 'e10adc3949ba59abbe56e057f20f883e', '110.168.249.76', NULL, '客服', 0, NULL, NULL, NULL, '13800000000', NULL, NULL, NULL, NULL, NULL, NULL, 1562242878119, NULL, 1, 0, '');
INSERT INTO `crm_member` VALUES (84559, 99, 1, 'admin-05', 'e10adc3949ba59abbe56e057f20f883e', '110.168.249.76', NULL, '财务', 0, NULL, NULL, NULL, '13900000000', NULL, NULL, NULL, NULL, NULL, NULL, 1562242921970, NULL, 1, 0, '');
INSERT INTO `crm_member` VALUES (84560, 1, 1, '2647872640@qq.com', 'e10adc3949ba59abbe56e057f20f883e', '127.0.0.1', '601', '金铭', 0, '', NULL, '', NULL, '601', NULL, NULL, NULL, 6, '70,75,6,', 1562243548781, 'normandm-01', 1, 0, '');

-- ----------------------------
-- Table structure for crm_member_bank_info
-- ----------------------------
DROP TABLE IF EXISTS `crm_member_bank_info`;
CREATE TABLE `crm_member_bank_info`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `member_id` bigint(20) NOT NULL COMMENT 'member表主键',
  `is_enable` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否启用，0否，1是',
  `bank_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行名称',
  `bank_branch` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行支行',
  `bank_swift_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行swift代码',
  `bank_card_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行卡号',
  `bank_province` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在省 ',
  `bank_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在市',
  `bank_district` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在区',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户人姓名',
  `mobile` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号码',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `last_modified` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `member_id`(`member_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '银行信息表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_mobile_code
-- ----------------------------
DROP TABLE IF EXISTS `crm_mobile_code`;
CREATE TABLE `crm_mobile_code`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '类型',
  `mobile` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号码',
  `code` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '验证码',
  `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
  `expire` int(11) NOT NULL DEFAULT 0 COMMENT '过期时间，如果为0，则程序自行判断',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `mobile`(`mobile`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '手机验证码' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_modify_lever
-- ----------------------------
DROP TABLE IF EXISTS `crm_modify_lever`;
CREATE TABLE `crm_modify_lever`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '类型（0：等待审核；1:已修改；2：不通过）',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `login` int(11) NOT NULL COMMENT '登录ID',
  `lever` int(11) NOT NULL COMMENT '杠杆',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '修改杠杆申请表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_mt4_deposit_log
-- ----------------------------
DROP TABLE IF EXISTS `crm_mt4_deposit_log`;
CREATE TABLE `crm_mt4_deposit_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `type` smallint(4) NOT NULL DEFAULT 1 COMMENT '类型 1入金 2出金',
  `mt4_id` int(11) NOT NULL DEFAULT 0 COMMENT 'mt4 id',
  `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单号',
  `mt4_order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'mt4订单号',
  `usd_money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '操作金额 美元',
  `err_code` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '错误码',
  `err_msg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '错误信息',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `log_id` int(11) NOT NULL DEFAULT 0 COMMENT '出入金的id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_notice
-- ----------------------------
DROP TABLE IF EXISTS `crm_notice`;
CREATE TABLE `crm_notice`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '公告/帮助类型(0:会员公告;1:代理商公告;2:用户帮助中心;3:代理帮助中心)',
  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题',
  `content` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '公告表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_notice_read
-- ----------------------------
DROP TABLE IF EXISTS `crm_notice_read`;
CREATE TABLE `crm_notice_read`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `notice_id` bigint(20) NOT NULL COMMENT '公告ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '公告阅读表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_open
-- ----------------------------
DROP TABLE IF EXISTS `crm_open`;
CREATE TABLE `crm_open`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `open_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '开户类型（1：xtrader用户；2：ib用户;）',
  `type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '开户状态（0:等待;1:处理中;2:完成;3:拒绝）',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名字',
  `id_card` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '身份证号码',
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '邮箱',
  `mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电话',
  `id_card_file_path0` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身份证正面',
  `id_card_file_path1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身份证反面',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  `rid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '推荐人ID',
  `mt4_login` int(11) NULL DEFAULT NULL COMMENT 'mt4账户ID',
  `mt4_login_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mt4账户登录密码',
  `mt4_view_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mt4账户查看密码',
  `member_id` bigint(20) NULL DEFAULT NULL COMMENT '代理商ID',
  `address` varchar(3000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址',
  `level` int(11) NULL DEFAULT NULL COMMENT '杠杆',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '开户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_open
-- ----------------------------
INSERT INTO `crm_open` VALUES (2, 2, 1, '韩博识', '620422199604060036', '2159915754@qq.com', NULL, '/upload/20190705152650_29301.jpg', '/upload/20190705152650_47733.jpg', 1562311610385, '601', NULL, 'ES5HYV8', 'tWKUk88', NULL, '甘肃省会宁县会师镇南关东路185号', NULL);
INSERT INTO `crm_open` VALUES (3, 2, 1, 'test', '130427198808133939', '649676852@qq.com', NULL, '/upload/20190706143113_71478.jpeg', '/upload/20190706143113_75475.jpeg', 1562394673280, '600', NULL, 'aSFnfh7', 'NeePDn0', NULL, 'shenzhen', NULL);
INSERT INTO `crm_open` VALUES (4, 2, 1, '韩博识', '620422199604060036', '2159915754@qq.com', NULL, '/upload/20190707161148_65607.jpg', '/upload/20190707161148_45800.jpg', 1562487108309, '601', NULL, 'mnwmwa5', '8NFCMK2', NULL, '甘肃省会宁县会师镇南关东路185号', NULL);

-- ----------------------------
-- Table structure for crm_permission
-- ----------------------------
DROP TABLE IF EXISTS `crm_permission`;
CREATE TABLE `crm_permission`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `url` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限列表',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'crm权限表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_permission
-- ----------------------------
INSERT INTO `crm_permission` VALUES (1, 1, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/transfer,/admin/notice,/admin/admin,/admin/ib,/admin/trades,/admin/deposit,/admin/deposit-config,/admin/ssac-deposit,/admin/withdraw,/admin/ssac-withdraw,/admin/finance-remit,/admin/remit,/admin/logs,/admin/config,/admin/mt4,/admin/mail,/admin/activity,/admin/mailconfig,/admin/mail/statistics,/admin/privateaccount,/admin/publicaccount,');
INSERT INTO `crm_permission` VALUES (4, 81969, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/notice,/admin/ib,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (5, 81970, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/notice,/admin/ib,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (6, 81971, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (7, 81972, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (8, 81973, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (9, 81974, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/notice,/admin/ib,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (10, 81976, '/admin/dashboard,/admin/password,/admin/member,/admin/user,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (11, 81975, '/admin/password,/admin/member,/admin/user,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (12, 81977, '/admin/password,/admin/member,/admin/user,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (13, 81978, '/admin/password,/admin/member,/admin/user,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (14, 81979, '/admin/password,/admin/member,/admin/user,/admin/open,/admin/transfer,/admin/admin,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (15, 81980, '/admin/password,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (16, 81981, '/admin/password,/admin/member,/admin/user,/admin/open,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (17, 81982, '/admin/password,/admin/member,/admin/user,/admin/open,/admin/transfer,/admin/ib,/admin/deposit,/admin/withdraw,');
INSERT INTO `crm_permission` VALUES (18, 82049, '/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/notice,/admin/ib,/admin/config,/admin/mail,');
INSERT INTO `crm_permission` VALUES (19, 82338, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (20, 82349, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (21, 82350, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (22, 82351, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (23, 82352, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (24, 82353, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (25, 82354, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/notice,/admin/ib,/admin/mail,');
INSERT INTO `crm_permission` VALUES (26, 82355, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/notice,/admin/ib,/admin/mt4,/admin/mail,');
INSERT INTO `crm_permission` VALUES (27, 82833, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modifyLever,/admin/transfer,/admin/notice,/admin/admin,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/logs,/admin/config,/admin/mt4,/admin/mail,');
INSERT INTO `crm_permission` VALUES (28, 83058, '/admin/member,/admin/user,/admin/ib,');
INSERT INTO `crm_permission` VALUES (29, 83064, '/admin/member,');
INSERT INTO `crm_permission` VALUES (30, 83209, '/admin/ssac-deposit,/admin/ssac-withdraw,');
INSERT INTO `crm_permission` VALUES (31, 83212, '/admin/dashboard,/admin/password,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/modify-lever,/admin/transfer,/admin/notice,/admin/ib,/admin/trades,/admin/deposit,/admin/deposit-config,/admin/ssac-deposit,/admin/withdraw,/admin/ssac-withdraw,/admin/finance-remit,/admin/remit,/admin/logs,/admin/config,/admin/mt4,/admin/mail,/admin/activity,');
INSERT INTO `crm_permission` VALUES (32, 82942, '/admin/dashboard,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (33, 82945, '/admin/dashboard,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (34, 82946, '/admin/dashboard,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (35, 82944, '/admin/dashboard,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (36, 82943, '/admin/dashboard,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (37, 82947, '/admin/dashboard,/admin/kindeditor,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (38, 84555, '/admin/dashboard,/admin/password,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (39, 84556, '/admin/dashboard,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (40, 84557, '/admin/dashboard,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (41, 84558, '/admin/dashboard,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');
INSERT INTO `crm_permission` VALUES (42, 84559, '/admin/dashboard,/admin/member,/admin/user,/admin/open,/admin/ib,/admin/trades,/admin/deposit,/admin/withdraw,/admin/mail,');

-- ----------------------------
-- Table structure for crm_private_account
-- ----------------------------
DROP TABLE IF EXISTS `crm_private_account`;
CREATE TABLE `crm_private_account`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '钱包地址',
  `is_close` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否关闭，0-启用，1-关闭',
  `is_used` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否使用过，0-未使用过，1-使用过',
  `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for crm_public_account
-- ----------------------------
DROP TABLE IF EXISTS `crm_public_account`;
CREATE TABLE `crm_public_account`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '帐号',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户人',
  `bank` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行',
  `is_close` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否关闭，0开放，1关闭',
  `is_used` tinyint(1) NOT NULL DEFAULT 0 COMMENT '当前循环中，是否被使用过，0未使用过，1使用过',
  `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加对公帐户的时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_remit_log
-- ----------------------------
DROP TABLE IF EXISTS `crm_remit_log`;
CREATE TABLE `crm_remit_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `remit_no` bigint(20) NOT NULL COMMENT '打款单号',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '审核人id',
  `admin_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '审核人名字',
  `admin_ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '审核人ip',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_remit_no`(`remit_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '打款日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_remit_order
-- ----------------------------
DROP TABLE IF EXISTS `crm_remit_order`;
CREATE TABLE `crm_remit_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `remit_no` bigint(20) NOT NULL COMMENT '打款单号',
  `batch_no` bigint(20) NOT NULL COMMENT '打款批次号',
  `biz_type` smallint(4) NOT NULL DEFAULT 0 COMMENT '业务类型 1出金',
  `biz_no` bigint(20) NOT NULL COMMENT '业务单号(出金单号)',
  `pay_type` int(11) NOT NULL COMMENT '打款方式',
  `payee_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '收款人名字',
  `amount` decimal(10, 2) NOT NULL COMMENT '打款金额',
  `bank_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行名称',
  `bank_branch` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行支行',
  `bank_card_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行卡号',
  `bank_province` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在省',
  `bank_city` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '开户行所在市',
  `bank_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行代码',
  `bank_branch_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行支行代码',
  `is_business` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否对公 0对私 1对公',
  `audit_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态 0未审核 1初审通过 2复审通过 3初审未通过 4复审未通过',
  `audit_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '初审人id',
  `audit_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '初审人名字',
  `audit_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '初审不通过原因',
  `audit_time` int(11) NOT NULL DEFAULT 0 COMMENT '初审时间',
  `reaudit_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '复审人id',
  `reaudit_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '复审人名字',
  `reaudit_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '复审不通过原因',
  `reaudit_time` int(11) NOT NULL DEFAULT 0 COMMENT '复审时间',
  `pay_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '打款状态 0未打款 1打款成功 2打款失败 3内部打款中 4外部打款中 5打款异常',
  `pay_time` int(11) NOT NULL DEFAULT 0 COMMENT '打款时间',
  `complete_time` int(11) NOT NULL DEFAULT 0 COMMENT '完成时间',
  `out_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '外部交易号',
  `out_no_crc32` int(11) NOT NULL DEFAULT 0 COMMENT '外部交易号CRC32',
  `ret_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '返回状态码',
  `res_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易状态码',
  `ret_msg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '返回信息',
  `sign` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据签名',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` int(11) NOT NULL COMMENT '创建时间',
  `last_modified` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uniq_remit_no`(`remit_no`) USING BTREE,
  INDEX `idx_batch_no`(`batch_no`) USING BTREE,
  INDEX `idx_biz_no_type`(`biz_no`, `biz_type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_signin
-- ----------------------------
DROP TABLE IF EXISTS `crm_signin`;
CREATE TABLE `crm_signin`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'ip',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户登录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of crm_signin
-- ----------------------------
INSERT INTO `crm_signin` VALUES (1, 1, '61.6.94.14', NULL, 1561991428555);
INSERT INTO `crm_signin` VALUES (2, 1, '61.6.94.14', NULL, 1562033762168);
INSERT INTO `crm_signin` VALUES (3, 1, '61.6.94.14', NULL, 1562049927012);
INSERT INTO `crm_signin` VALUES (4, 1, '61.6.94.14', NULL, 1562061913101);
INSERT INTO `crm_signin` VALUES (5, 1, '61.6.94.14', NULL, 1562061934034);
INSERT INTO `crm_signin` VALUES (6, 1, '110.168.249.76', NULL, 1562242306542);
INSERT INTO `crm_signin` VALUES (7, 1, '110.168.249.76', NULL, 1562242360674);
INSERT INTO `crm_signin` VALUES (8, 1, '110.168.249.76', NULL, 1562242513790);
INSERT INTO `crm_signin` VALUES (9, 1, '110.168.249.76', NULL, 1562242712327);
INSERT INTO `crm_signin` VALUES (10, 1, '182.232.217.186', NULL, 1562244337290);
INSERT INTO `crm_signin` VALUES (11, 84555, '171.6.242.122', NULL, 1562306686649);
INSERT INTO `crm_signin` VALUES (12, 84555, '171.6.243.201', NULL, 1562309360035);
INSERT INTO `crm_signin` VALUES (13, 1, '110.168.251.215', NULL, 1562325077787);
INSERT INTO `crm_signin` VALUES (14, 1, '61.6.94.14', NULL, 1562325209281);
INSERT INTO `crm_signin` VALUES (15, 1, '61.6.94.14', NULL, 1562326708650);
INSERT INTO `crm_signin` VALUES (16, 1, '61.6.94.14', NULL, 1562336158530);
INSERT INTO `crm_signin` VALUES (17, 84555, '171.6.242.41', NULL, 1562484658118);
INSERT INTO `crm_signin` VALUES (18, 84555, '171.6.242.41', NULL, 1562511449641);
INSERT INTO `crm_signin` VALUES (19, 1, '61.6.94.14', NULL, 1562549068348);
INSERT INTO `crm_signin` VALUES (20, 84560, '127.0.0.1', NULL, 1573975628695);
INSERT INTO `crm_signin` VALUES (21, 84560, '127.0.0.1', NULL, 1573975818191);

-- ----------------------------
-- Table structure for crm_sync_desposit
-- ----------------------------
DROP TABLE IF EXISTS `crm_sync_desposit`;
CREATE TABLE `crm_sync_desposit`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `login` int(11) NOT NULL COMMENT '用户登录ID',
  `amount` double NOT NULL COMMENT '金额（美元）',
  `comment` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '同步入金类型（FIX，AUTO）',
  `is_sync` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否同步（0：未同步；1：已同步）',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `record_id` int(11) NULL DEFAULT NULL COMMENT '记录ID',
  `in_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '创建时间',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '入金类型  1-佣金 2-三方支付',
  `last_modified` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '最后修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '同步入金记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_transfer
-- ----------------------------
DROP TABLE IF EXISTS `crm_transfer`;
CREATE TABLE `crm_transfer`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '状态(0:等待审核;1:不通过;2:已转账)',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `from_login` int(11) NOT NULL COMMENT '转出账户',
  `to_login` int(11) NOT NULL COMMENT '转入账户',
  `amount` decimal(20, 2) NOT NULL COMMENT '金额',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `admin_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '同名转账表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_user_member
-- ----------------------------
DROP TABLE IF EXISTS `crm_user_member`;
CREATE TABLE `crm_user_member`  (
  `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `login` int(11) NOT NULL COMMENT '登录ID',
  `member_id` bigint(20) NOT NULL COMMENT '上级代理商ID',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名字',
  `is_commission_run` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否存在上级代理（0：无；1：有）',
  `in_time` bigint(20) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 56067 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'mt4用户和member映射表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for crm_withdraw
-- ----------------------------
DROP TABLE IF EXISTS `crm_withdraw`;
CREATE TABLE `crm_withdraw`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `type` tinyint(4) NOT NULL COMMENT '出金状态（0：等待审核；1：不通过；2：已出金；3：管理员撤销；4：未分享朋友圈；5：暂不处理；6：处理中）',
  `member_id` bigint(20) NOT NULL COMMENT '代理商ID',
  `amount` decimal(21, 2) NOT NULL COMMENT '出金金额',
  `fee` decimal(21, 2) NOT NULL DEFAULT 0.00 COMMENT '手续费',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `in_time` bigint(20) NOT NULL COMMENT '申请时间',
  `out_time` bigint(20) NOT NULL DEFAULT 0 COMMENT '出金时间',
  `true_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
  `bank_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行名称',
  `bank_sub_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分行名称',
  `bank_card_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行卡号',
  `bank_province` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行省份',
  `bank_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '银行城市',
  `mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电话号码',
  `login` int(11) NOT NULL COMMENT 'mt4登录ID',
  `rate` decimal(20, 3) NOT NULL COMMENT '汇率',
  `swift` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Swift',
  `mt4_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'mt4 出金状态',
  `admin_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '出金记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for mt4_config
-- ----------------------------
DROP TABLE IF EXISTS `mt4_config`;
CREATE TABLE `mt4_config`  (
  `CONFIG` int(11) NOT NULL,
  `VALUE_INT` int(11) NULL DEFAULT NULL,
  `VALUE_STR` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`CONFIG`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of mt4_config
-- ----------------------------
INSERT INTO `mt4_config` VALUES (0, 0, NULL);
INSERT INTO `mt4_config` VALUES (1, 1562536806, NULL);
INSERT INTO `mt4_config` VALUES (2, 0, NULL);
INSERT INTO `mt4_config` VALUES (3, NULL, ',*,');
INSERT INTO `mt4_config` VALUES (4, NULL, 'localhost:5443');
INSERT INTO `mt4_config` VALUES (5, 10000, NULL);
INSERT INTO `mt4_config` VALUES (1000, 1123, NULL);

-- ----------------------------
-- Table structure for mt4_prices
-- ----------------------------
DROP TABLE IF EXISTS `mt4_prices`;
CREATE TABLE `mt4_prices`  (
  `SYMBOL` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `TIME` datetime(0) NULL DEFAULT NULL,
  `BID` double NOT NULL,
  `ASK` double NOT NULL,
  `LOW` double NOT NULL,
  `HIGH` double NOT NULL,
  `DIRECTION` int(11) NOT NULL,
  `DIGITS` int(11) NOT NULL,
  `SPREAD` int(11) NOT NULL,
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`SYMBOL`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for mt4_trades
-- ----------------------------
DROP TABLE IF EXISTS `mt4_trades`;
CREATE TABLE `mt4_trades`  (
  `TICKET` int(11) NOT NULL,
  `LOGIN` int(11) NOT NULL,
  `SYMBOL` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `DIGITS` int(11) NOT NULL,
  `CMD` int(11) NOT NULL,
  `VOLUME` int(11) NOT NULL,
  `OPEN_TIME` datetime(0) NULL DEFAULT NULL,
  `OPEN_PRICE` double NOT NULL,
  `SL` double NOT NULL,
  `TP` double NOT NULL,
  `CLOSE_TIME` datetime(0) NULL DEFAULT NULL,
  `EXPIRATION` datetime(0) NULL DEFAULT NULL,
  `REASON` int(11) NOT NULL DEFAULT 0,
  `CONV_RATE1` double NOT NULL,
  `CONV_RATE2` double NOT NULL,
  `COMMISSION` double NOT NULL,
  `COMMISSION_AGENT` double NOT NULL,
  `SWAPS` double NOT NULL,
  `CLOSE_PRICE` double NOT NULL,
  `PROFIT` double NOT NULL,
  `TAXES` double NOT NULL,
  `COMMENT` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `INTERNAL_ID` int(11) NOT NULL,
  `MARGIN_RATE` double NOT NULL,
  `TIMESTAMP` int(11) NOT NULL,
  `MAGIC` int(11) NOT NULL DEFAULT 0,
  `GW_VOLUME` int(11) NOT NULL DEFAULT 0,
  `GW_OPEN_PRICE` int(11) NOT NULL DEFAULT 0,
  `GW_CLOSE_PRICE` int(11) NOT NULL DEFAULT 0,
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`TICKET`) USING BTREE,
  INDEX `INDEX_LOGIN`(`LOGIN`) USING BTREE,
  INDEX `INDEX_CMD`(`CMD`) USING BTREE,
  INDEX `INDEX_OPENTIME`(`OPEN_TIME`) USING BTREE,
  INDEX `INDEX_CLOSETIME`(`CLOSE_TIME`) USING BTREE,
  INDEX `INDEX_STAMP`(`TIMESTAMP`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for mt4_users
-- ----------------------------
DROP TABLE IF EXISTS `mt4_users`;
CREATE TABLE `mt4_users`  (
  `LOGIN` int(11) NOT NULL,
  `GROUP` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ENABLE` int(11) NOT NULL,
  `ENABLE_CHANGE_PASS` int(11) NOT NULL,
  `ENABLE_READONLY` int(11) NOT NULL,
  `ENABLE_OTP` int(11) NOT NULL DEFAULT 0,
  `PASSWORD_PHONE` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `NAME` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `COUNTRY` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `CITY` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `STATE` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ZIPCODE` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ADDRESS` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `LEAD_SOURCE` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
  `PHONE` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `EMAIL` char(48) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `COMMENT` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `ID` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `STATUS` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `REGDATE` datetime(0) NULL DEFAULT NULL,
  `LASTDATE` datetime(0) NULL DEFAULT NULL,
  `LEVERAGE` int(11) NOT NULL,
  `AGENT_ACCOUNT` int(11) NOT NULL,
  `TIMESTAMP` int(11) NOT NULL,
  `BALANCE` double NOT NULL,
  `PREVMONTHBALANCE` double NOT NULL,
  `PREVBALANCE` double NOT NULL,
  `CREDIT` double NOT NULL,
  `INTERESTRATE` double NOT NULL,
  `TAXES` double NOT NULL,
  `SEND_REPORTS` int(11) NOT NULL,
  `MQID` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `USER_COLOR` int(11) NOT NULL,
  `EQUITY` double NOT NULL DEFAULT 0,
  `MARGIN` double NOT NULL DEFAULT 0,
  `MARGIN_LEVEL` double NOT NULL DEFAULT 0,
  `MARGIN_FREE` double NOT NULL DEFAULT 0,
  `CURRENCY` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
  `API_DATA` blob NULL,
  `MODIFY_TIME` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`LOGIN`) USING BTREE,
  INDEX `INDEX_STAMP`(`TIMESTAMP`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of mt4_users
-- ----------------------------
INSERT INTO `mt4_users` VALUES (1, 'manager', 1, 1, 0, 1, '', 'First Admin', '', '', '', '', '', '', '', '', 'automaticaly generated on startup', '', '', '2019-06-30 13:11:32', '2019-07-02 10:16:04', 0, 0, 1561991924, 0, 0, 0, 0, 0, 0, 0, 0, -16777216, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-02 21:10:53');
INSERT INTO `mt4_users` VALUES (2, 'manager', 0, 0, 0, 0, '', 'Lost & found (for lost commissions)', '', '', '', '', '', '', '', '', 'must be always disabled, but do not delete!', '', '', '2019-06-30 13:11:32', '2019-06-30 13:11:32', 0, 0, 1561900292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-01 10:41:36');
INSERT INTO `mt4_users` VALUES (3, 'manager', 1, 1, 0, 1, '', 'R', 'China', '', '', '', '', '', '', '', '', '', 'RE', '2019-07-02 06:37:19', '2019-07-02 06:37:19', 100, 0, 1562049439, 0, 0, 0, 0, 0, 0, 1, 0, -16777216, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-02 06:51:15');
INSERT INTO `mt4_users` VALUES (11, 'system', 1, 1, 0, 1, '', 'dc1', 'China', '', '', '', '', '', '', '', '', '', 'RE', '2019-07-01 09:17:21', '2019-07-01 09:17:21', 100, 0, 1561972685, 0, 0, 0, 0, 0, 0, 1, 0, -16777216, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-01 10:41:36');
INSERT INTO `mt4_users` VALUES (616, 'manager', 1, 1, 0, 1, '', 'oldt', 'China', '', '', '', '', '', '', '', '', '', 'RE', '2019-06-30 12:04:57', '2019-06-30 12:04:57', 100, 0, 1561896297, 0, 0, 0, 0, 0, 0, 1, 0, -16777216, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-02 01:37:33');
INSERT INTO `mt4_users` VALUES (1003, 'system', 1, 1, 0, 1, '', 'datafeed_for_demo', 'China', '', '', '', '', '', '', '', '', '', 'RE', '2019-07-01 14:35:25', '2019-07-07 20:00:01', 100, 0, 1562025557, 0, 0, 0, 0, 0, 0, 1, 0, -16777216, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-07 21:10:27');
INSERT INTO `mt4_users` VALUES (10000, 'manager', 1, 1, 0, 1, '', 'api_and_report', 'China', '', '', '', '', '', '', '', '', '', 'RE', '2019-07-01 09:27:06', '2019-07-07 22:10:26', 100, 0, 1561988352, 0, 0, 0, 0, 0, 0, 1, 0, -16777216, 0, 0, 0, 0, '', 0x00000000000000000000000000000000, '2019-07-07 21:10:27');
INSERT INTO `mt4_users` VALUES (80000000, 'ND01', 1, 1, 0, 1, '', 'TEST', 'China', '', '', '', '', '', '', '', '', '', 'RE', '2019-07-02 07:53:33', '2019-07-07 08:14:11', 100, 0, 1562126488, 498328.5, 0, 498328.5, 0, 0, 0, 1, 0, -16777216, 495116.39, 6000, 8251.939833333334, 489116.39, 'USD', 0x00000000000000000000000000000000, '2019-07-08 02:07:48');

SET FOREIGN_KEY_CHECKS = 1;
