/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50729
 Source Host           : localhost:3306
 Source Schema         : aikang_test

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

 Date: 26/02/2020 09:02:58
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for AR_AD
-- ----------------------------
DROP TABLE IF EXISTS `AR_AD`;
CREATE TABLE `AR_AD` (
  `ID` varchar(32) NOT NULL,
  `TITLE` varchar(48) NOT NULL,
  `IMAGE` varchar(1000) NOT NULL,
  `TYPE` tinyint(1) NOT NULL,
  `LID` varchar(32) NOT NULL,
  `CONTENT` varchar(1000) DEFAULT NULL,
  `SORT` tinyint(2) NOT NULL DEFAULT '10',
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `TITLE` (`TITLE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='广告';

BEGIN;
INSERT INTO `AR_AD` (ID, TITLE, IMAGE, TYPE, LID, CONTENT, SORT, STATUS, CREATE_ADMIN, UPDATE_ADMIN, CREATED_AT, UPDATED_AT) VALUES ('97D768C0C80C1301E053693418AC7112', '点点滴滴', 'http://upload.lxak2020.com/files/2019/1227/c6cbf858284911eaacd700163e007e21.jpg', 1, '7EFF6260A16C3CC7E053693418AC03E4', '#', 10, 1, '8E57B73F979B0863E053693418AC9F70', null, 1574322019, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_ADMIN
-- ----------------------------
DROP TABLE IF EXISTS `AR_ADMIN`;
CREATE TABLE `AR_ADMIN` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `ADMIN_NAME` varchar(255) NOT NULL COMMENT '用户名',
  `REAL_NAME` varchar(128) NOT NULL COMMENT '会员姓名',
  `REMARK` varchar(255) DEFAULT NULL COMMENT '备注',
  `ROLE_ID` varchar(32) NOT NULL COMMENT '角色ID',
  `IS_ENABLE` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  `AUTH_KEY` varchar(255) DEFAULT NULL COMMENT '认证KEY',
  `PASSWORD_HASH` varchar(255) NOT NULL COMMENT '密码',
  `PASSWORD_RESET_TOKEN` varchar(255) DEFAULT NULL COMMENT '重设密码TOKEN',
  `DONT_DEL` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不可删除',
  `IS_DEL` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `LOGIN_NUMS` int(10) NOT NULL DEFAULT '0' COMMENT '登录次数',
  `FAIL_NUMS` int(10) NOT NULL DEFAULT '0' COMMENT '登录失败次数',
  `LAST_LOGIN_IP` varchar(16) NOT NULL DEFAULT '0.0.0.0' COMMENT '上次登录IP',
  `LAST_LOGIN_AT` int(10) NOT NULL DEFAULT '0' COMMENT '上次登录时间',
  `BIND_IP` text COMMENT '绑定IP',
  `CREATE_ADMIN` varchar(32) NOT NULL COMMENT '创建管理员',
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL COMMENT '更新管理员',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '删除时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ADMIN_NAME` (`ADMIN_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员表';

-- ----------------------------
-- Records of AR_ADMIN
-- ----------------------------
BEGIN;
INSERT INTO `AR_ADMIN` VALUES ('7d43ed1e579a11ea95b9e8612aaeea8d', 'admin', 'admin', '', '666A7F102B8D6C66E055736AECE8644D', 1, 'asdsad', '$2y$13$ZTJsT7UpOiaebII1ex3vV.boCW9hTJseV3/pbuYJ2lQQltcKq/hcG', NULL, 1, 0, 8, 0, '127.0.0.1', 1582624678, '', '65F27BCE7FD278FFE055736AECE8644D', NULL, 1519978161, 0, 0);
INSERT INTO `AR_ADMIN` VALUES ('86f0113857b511ea95b9e8612aaeea8d', 'adminx', '测试徐', '无', '666A7F102B8D6C66E055736AECE8644D', 1, NULL, '$2y$13$UmF530SIgz9H.a/Vn2WrFec08suLthDDykavMo6F95OW03oAVbXkC', NULL, 0, 0, 2, 0, '127.0.0.1', 1582624796, '', '7d43ed1e579a11ea95b9e8612aaeea8d', NULL, 1582624774, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_ADMIN_ROLE
-- ----------------------------
DROP TABLE IF EXISTS `AR_ADMIN_ROLE`;
CREATE TABLE `AR_ADMIN_ROLE` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `ROLE_NAME` varchar(255) NOT NULL COMMENT '角色名',
  `REMARK` varchar(255) DEFAULT NULL COMMENT '描述',
  `PERMISSION` text COMMENT '权限',
  `COLUMN_PERMISSION` text COMMENT '列表字段权限',
  `DONT_DEL` tinyint(1) NOT NULL DEFAULT '0' COMMENT '不可删除',
  `CREATE_ADMIN` varchar(32) DEFAULT NULL COMMENT '创建管理员',
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL COMMENT '更新管理员',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ROLE_NAME` (`ROLE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员角色表';

-- ----------------------------
-- Records of AR_ADMIN_ROLE
-- ----------------------------
BEGIN;
INSERT INTO `AR_ADMIN_ROLE` VALUES ('666A7F102B8D6C66E055736AECE8644D', '超级管理员', '全局管理', NULL, NULL, 1, '65F27BCE7FD278FFE055736AECE8644D', NULL, 1519978161, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_ADMIN_TOKEN
-- ----------------------------
DROP TABLE IF EXISTS `AR_ADMIN_TOKEN`;
CREATE TABLE `AR_ADMIN_TOKEN` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `ADMIN_ID` varchar(32) NOT NULL COMMENT '管理员ID',
  `PC_ACCESS_TOKEN` varchar(255) DEFAULT NULL COMMENT 'PC认证TOKEN',
  `APP_ACCESS_TOKEN` varchar(255) DEFAULT NULL COMMENT 'APP认证TOKEN',
  `PC_REFRESH_TOKEN` varchar(255) DEFAULT NULL COMMENT 'PC刷新TOKEN',
  `APP_REFRESH_TOKEN` varchar(255) DEFAULT NULL COMMENT 'APP刷新TOKEN',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `PAT_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'PCACCESSTOKEN更新时间',
  `AAT_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'APPACCESSTOKEN更新时间',
  `PRT_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'PCREFRESHTOKEN更新时间',
  `ART_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'PCREFRESHTOKEN更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `PC_ACCESS_TOKEN` (`PC_ACCESS_TOKEN`),
  UNIQUE KEY `APP_ACCESS_TOKEN` (`APP_ACCESS_TOKEN`),
  UNIQUE KEY `PC_REFRESH_TOKEN` (`PC_REFRESH_TOKEN`),
  UNIQUE KEY `APP_REFRESH_TOKEN` (`APP_REFRESH_TOKEN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员TOKEN表';

-- ----------------------------
-- Records of AR_ADMIN_TOKEN
-- ----------------------------
BEGIN;
INSERT INTO `AR_ADMIN_TOKEN` VALUES ('6642C11AD4A66F07E055736AECE8644D', '65F27BCE7FD278FFE055736AECE8644D', '08ff6856c6ff0c8289a4958921221e05', NULL, '7875e4c5eff79308d4ce2af7ed5ecd0c', NULL, 1519807464, 1521508188, 0, 1521508188, 0);
INSERT INTO `AR_ADMIN_TOKEN` VALUES ('910e79d457b511ea95b9e8612aaeea8d', '86f0113857b511ea95b9e8612aaeea8d', '063ec85dafc339eac1d6846cc3b8d5df', NULL, 'db206d7c06c9bbf66ec3f8942a521de4', NULL, 1582624791, 1582624796, 0, 1582624796, 0);
INSERT INTO `AR_ADMIN_TOKEN` VALUES ('a3b72b9a57af11ea95b9e8612aaeea8d', '7d43ed1e579a11ea95b9e8612aaeea8d', '5a124063d3bbd56c4794c10e4b267c8e', NULL, '245668dd7e0582ee5ccb17cf4d2b28ad', NULL, 1582622245, 1582624678, 0, 1582624678, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_AD_LOCATION
-- ----------------------------
DROP TABLE IF EXISTS `AR_AD_LOCATION`;
CREATE TABLE `AR_AD_LOCATION` (
  `ID` varchar(32) NOT NULL,
  `LOCATION_NAME` varchar(48) NOT NULL,
  `REMARK` varchar(255) NOT NULL,
  `TYPE` tinyint(1) NOT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `LOCATION_NAME` (`LOCATION_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='广告位';

-- ----------------------------
-- Records of AR_AD_LOCATION
-- ----------------------------
BEGIN;
-- INSERT INTO `AR_AD_LOCATION` VALUES ('44AC521CCA2E4E21B05E131EE54A259A', '手机APP首页底部广告', '手机APP首页底部图片广告', 2, '65F27BCE7FD278FFE055736AECE8644D', NULL, 1523245926, 0);
-- INSERT INTO `AR_AD_LOCATION` VALUES ('CF4D22A9BB6147AC8A4A655166B40827', '手机APP首页顶部广告', '手机APP首页导航栏下方的幻灯广告位', 1, '65F27BCE7FD278FFE055736AECE8644D', NULL, 1523245926, 0);
INSERT INTO `AR_AD_LOCATION` (ID, LOCATION_NAME, REMARK, TYPE, CREATE_ADMIN, UPDATE_ADMIN, CREATED_AT, UPDATED_AT) VALUES ('7EFF6260A16C3CC7E053693418AC03E4', 'PC首页幻灯', 'PC首页幻灯', 1, '65F27BCE7FD278FFE055736AECE8644D', null, 1523245926, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_ARTICLE
-- ----------------------------
DROP TABLE IF EXISTS `AR_ARTICLE`;
CREATE TABLE `AR_ARTICLE` (
  `ID` varchar(32) NOT NULL,
  `TITLE` varchar(255) NOT NULL,
  `CID` varchar(32) NOT NULL,
  `CONTENT` text,
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `TITLE` (`TITLE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章表';

-- ----------------------------
-- Table structure for AR_ARTICLE_CATEGORY
-- ----------------------------
DROP TABLE IF EXISTS `AR_ARTICLE_CATEGORY`;
CREATE TABLE `AR_ARTICLE_CATEGORY` (
  `ID` varchar(32) NOT NULL,
  `CATE_NAME` varchar(48) NOT NULL,
  `SORT` tinyint(2) NOT NULL DEFAULT '10',
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `CATE_NAME` (`CATE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章分类表';

-- ----------------------------
-- Table structure for AR_BALANCE_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_BALANCE_AUDIT`;
CREATE TABLE `AR_BALANCE_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_DEC_ROLE_ID` varchar(32) DEFAULT '',
  `TYPE` varchar(48) NOT NULL,
  `DEAL_TYPE` varchar(32) NOT NULL,
  `AMOUNT` float(16,2) NOT NULL DEFAULT '0.00',
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `UPDATE_ADMIN_ID` varchar(32) DEFAULT NULL,
  `AUDIT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `REMARK_IS_SHOW` tinyint(1) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `TYPE` (`TYPE`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='钱包变更审核记录';

-- ----------------------------
-- Table structure for AR_BILL
-- ----------------------------
DROP TABLE IF EXISTS `AR_BILL`;
CREATE TABLE `AR_BILL` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `BILL_NO` varchar(255) NOT NULL,
  `BILL_AMOUNT` float(16,2) NOT NULL DEFAULT '0.00',
  `USED_AMOUNT` float(16,2) NOT NULL DEFAULT '0.00',
  `EXPIRY_DATE` int(10) NOT NULL,
  `INPUT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员提供的税票';

-- ----------------------------
-- Table structure for AR_CALC_BONUS
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS`;
CREATE TABLE `AR_CALC_BONUS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_USER_NAME` varchar(16) NOT NULL,
  `LAST_REAL_NAME` varchar(128) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_MOBILE` varchar(11) DEFAULT '',
  `LAST_PERIOD_AT` int(10) NOT NULL DEFAULT '0',
  `LAST_CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `LAST_SUB_COM_ID` varchar(32) DEFAULT '',
  `LAST_PROVINCE` int(6) DEFAULT '0',
  `LAST_CITY` int(6) DEFAULT '0',
  `LAST_COUNTY` int(6) DEFAULT '0',
  `LAST_SYSTEM_ID` varchar(32) NOT NULL,
  `LAST_IS_DIRECT_SELLER` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_REC_USER_NAME` varchar(16) DEFAULT '',
  `LAST_REC_REAL_NAME` varchar(128) DEFAULT '',
  `LAST_CON_USER_NAME` varchar(16) DEFAULT '',
  `LAST_CON_REAL_NAME` varchar(128) DEFAULT '',
  `LAST_LOCATION` tinyint(1) NOT NULL,
  `BONUS_QY` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_YC` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_FX` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_LS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_FW` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_BT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_BT_PROD` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_BT_TOOL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `DEDUCT_ZR` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_FL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_CF` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_LX` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SHOULD_QY` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SHOULD_DEDUCT_ZR` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_PCS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_LS_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_LS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_LS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_INCOME` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `CALCULATED_AT` int(10) NOT NULL,
  `IS_SENT` tinyint(1) NOT NULL DEFAULT '0',
  `SENT_AT` int(10) NOT NULL DEFAULT '0',
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `BONUS_QY_MONTH` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_BD` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_BD` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_TG` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_TG` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_YJ` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_YJ` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_QY` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_YC` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_GX` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_GX` decimal(16,3) NOT NULL DEFAULT '0.000',
  `BONUS_GL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORI_BONUS_GL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `IS_SENT` (`IS_SENT`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='总奖金结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_BD
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_BD`;
CREATE TABLE `AR_CALC_BONUS_BD` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `FROM_USER_ID` (`FROM_USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='报单奖结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_BT
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_BT`;
CREATE TABLE `AR_CALC_BONUS_BT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_DEC_ROLE_ID` varchar(32) DEFAULT '',
  `BT_TYPE` varchar(8) NOT NULL,
  `FROM_ORDER_SN` varchar(32) DEFAULT '',
  `ORDER_TIME` int(10) NOT NULL DEFAULT '0',
  `ORDER_PERIOD` int(10) NOT NULL DEFAULT '0',
  `DELIVERY_AT` int(10) NOT NULL DEFAULT '0',
  `DELIVERY_PERIOD` int(10) NOT NULL DEFAULT '0',
  `PAY_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PAY_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TRANSFER_SN` varchar(32) DEFAULT '',
  `TRANSFER_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TRANSFER_AT` int(10) NOT NULL DEFAULT '0',
  `TRANSFER_PERIOD` int(10) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `LOGS` varchar(2000) DEFAULT '',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='报单中心店补补贴记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_CF
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_CF`;
CREATE TABLE `AR_CALC_BONUS_CF` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='车房养老结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_FL
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_FL`;
CREATE TABLE `AR_CALC_BONUS_FL` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_ROLE_ID` varchar(32) NOT NULL,
  `DEC_SN` varchar(32) NOT NULL,
  `TO_USER_ID` varchar(32) NOT NULL,
  `DEC_AT` int(10) NOT NULL DEFAULT '0',
  `DEC_PERIOD` int(10) NOT NULL DEFAULT '0',
  `DEC_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `DEC_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `ORDER_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='货补记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_FW
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_FW`;
CREATE TABLE `AR_CALC_BONUS_FW` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_DEC_ROLE_ID` varchar(32) DEFAULT '',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_FROM_DEC_ROLE_ID` varchar(32) DEFAULT '',
  `LAST_FROM_PROVINCE` int(6) DEFAULT '0',
  `LAST_FROM_CITY` int(6) DEFAULT '0',
  `LAST_FROM_COUNTY` int(6) DEFAULT '0',
  `FROM_ORDER_SN` varchar(32) DEFAULT '',
  `ORDER_TIME` int(10) NOT NULL DEFAULT '0',
  `ORDER_PERIOD` int(10) NOT NULL DEFAULT '0',
  `DELIVERY_AT` int(10) NOT NULL DEFAULT '0',
  `DELIVERY_PERIOD` int(10) NOT NULL DEFAULT '0',
  `PAY_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PAY_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ORDER_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区级店业绩提成结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_FX
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_FX`;
CREATE TABLE `AR_CALC_BONUS_FX` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `DEEP` int(10) NOT NULL,
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='复销奖结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_GL
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_GL`;
CREATE TABLE `AR_CALC_BONUS_GL` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `FROM_USER_ID` (`FROM_USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理奖结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_GX
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_GX`;
CREATE TABLE `AR_CALC_BONUS_GX` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `FROM_USER_ID` (`FROM_USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='共享奖结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_LS
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_LS`;
CREATE TABLE `AR_CALC_BONUS_LS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='零售结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_LX
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_LX`;
CREATE TABLE `AR_CALC_BONUS_LX` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='领袖分红结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_QY
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_QY`;
CREATE TABLE `AR_CALC_BONUS_QY` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区域津贴结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_TG
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_TG`;
CREATE TABLE `AR_CALC_BONUS_TG` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `FROM_USER_ID` (`FROM_USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='推广奖结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_YC
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_YC`;
CREATE TABLE `AR_CALC_BONUS_YC` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `DEEP` int(10) NOT NULL,
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `FROM_USER_ID` (`FROM_USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='育成津贴结算记录';

-- ----------------------------
-- Table structure for AR_CALC_BONUS_YJ
-- ----------------------------
DROP TABLE IF EXISTS `AR_CALC_BONUS_YJ`;
CREATE TABLE `AR_CALC_BONUS_YJ` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `FROM_USER_ID` varchar(32) NOT NULL,
  `LAST_FROM_DEC_LV` varchar(32) DEFAULT '',
  `LAST_FROM_EMP_LV` varchar(32) DEFAULT '',
  `LAST_FROM_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `LOGS` varchar(2000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `ORI_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RECONSUME_POINTS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `MANAGE_TAX` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `FROM_USER_ID` (`FROM_USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='业绩奖结算记录';

-- ----------------------------
-- Table structure for AR_CF_LX_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_CF_LX_AUDIT`;
CREATE TABLE `AR_CF_LX_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `CF` float(16,2) NOT NULL DEFAULT '0.00',
  `LX` float(16,2) NOT NULL DEFAULT '0.00',
  `YEAR` int(4) NOT NULL DEFAULT '0',
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `YEAR` (`YEAR`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='车房领袖年度发放审核表';

-- ----------------------------
-- Table structure for AR_COMPANY_BANK
-- ----------------------------
DROP TABLE IF EXISTS `AR_COMPANY_BANK`;
CREATE TABLE `AR_COMPANY_BANK` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `OPEN_NAME` varchar(255) NOT NULL,
  `OPEN_BANK` varchar(255) NOT NULL,
  `BANK_ADDRESS` varchar(255) NOT NULL,
  `BANK_NO` varchar(32) NOT NULL,
  `BANK_PROVINCE` int(6) NOT NULL,
  `BANK_CITY` int(6) NOT NULL,
  `BANK_COUNTY` int(6) NOT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公司银行信息';

-- ----------------------------
-- Table structure for AR_CONFIG
-- ----------------------------
DROP TABLE IF EXISTS `AR_CONFIG`;
CREATE TABLE `AR_CONFIG` (
  `CONFIG_NAME` varchar(32) NOT NULL COMMENT '配置参数名',
  `TITLE` varchar(48) NOT NULL COMMENT '标题',
  `UNIT` varchar(32) DEFAULT NULL COMMENT '单位',
  `INPUT_TYPE` int(2) NOT NULL DEFAULT '1' COMMENT '表单类型',
  `OPTIONS` text COMMENT '参数配置的选项',
  `VALUE` text NOT NULL COMMENT '配置值',
  `TYPE` varchar(32) NOT NULL COMMENT '类型',
  `SORT` int(10) NOT NULL DEFAULT '1' COMMENT '排序',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统配置表';

-- ----------------------------
-- Records of AR_CONFIG
-- ----------------------------
BEGIN;
INSERT INTO `AR_CONFIG` VALUES ('siteTitle', '网站标题', NULL, 1, NULL, '会员管理系统', 'base', 1, 1521085263, 1524013893);
INSERT INTO `AR_CONFIG` VALUES ('decPercent', '报单奖比例', '%', 1, NULL, '3', 'bonus', 1, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('transferOpen', '是否开启转账功能', NULL, 8, NULL, '1', 'transfer', 1, 1521085263, 1581816562);
INSERT INTO `AR_CONFIG` VALUES ('smsOpen', '是否开启短信通知', NULL, 8, NULL, '1', 'sms', 1, 1521085263, 1522396087);
INSERT INTO `AR_CONFIG` VALUES ('calcYear', '期数计算至年份', '年', 4, NULL, '2021', 'period', 1, 1521085263, 1582678781);
INSERT INTO `AR_CONFIG` VALUES ('siteClose', '是否关闭网站', NULL, 8, NULL, '0', 'base', 2, 1521085263, 1524013893);
INSERT INTO `AR_CONFIG` VALUES ('allowWallet', '转出转入配置', NULL, 10, NULL, '[{\"out\":\"bonus\",\"in\":\"cash\",\"outMin\":\"0\",\"outMax\":\"500\",\"fee\":\"0\",\"feeMin\":\"0\",\"feeMax\":\"0\",\"weekMax\":\"0\",\"monthMax\":\"0\",\"isSystem\":true,\"isBind\":true,\"isOpen\":true},{\"out\":\"bonus\",\"in\":\"bonus\",\"outMin\":\"0\",\"outMax\":\"1000\",\"fee\":\"0\",\"feeMin\":\"0\",\"feeMax\":\"0\",\"weekMax\":\"2000\",\"monthMax\":\"5000\",\"isSystem\":true,\"isBind\":true,\"isOpen\":true}]', 'transfer', 2, 1521085263, 1581816562);
INSERT INTO `AR_CONFIG` VALUES ('smsFee', '短信月费用', '元/月', 1, NULL, '10', 'sms', 2, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('closeWeekDate', '自动封期星期', NULL, 2, '[{\"label\":\"星期一\",\"value\":\"1\"},{\"label\":\"星期二\",\"value\":\"2\"},{\"label\":\"星期三\",\"value\":\"3\"},{\"label\":\"星期四\",\"value\":\"4\"},{\"label\":\"星期五\",\"value\":\"5\"},{\"label\":\"星期六\",\"value\":\"6\"},{\"label\":\"星期日\",\"value\":\"0\"}]', '1', 'period', 2, 1521085263, 1582678781);
INSERT INTO `AR_CONFIG` VALUES ('recPercent', '推广奖比例', '%', 1, NULL, '15', 'bonus', 2, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('siteCloseInfo', '关闭提示信息', NULL, 1, NULL, '网站正在维护中...', 'base', 3, 1521085263, 1524013893);
INSERT INTO `AR_CONFIG` VALUES ('pointsLayer', '业绩奖偶数层数', '层', 1, NULL, '10', 'bonus', 3, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('smsWallet', '短信费用扣除钱包', NULL, 2, '[{\"label\":\"奖金钱包\",\"value\":\"1\"},{\"label\":\"现金钱包\",\"value\":\"2\"}]', '1,2', 'sms', 3, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('closeTime', '自动封期时间', NULL, 7, '{\"start\":\"00:00\",\"end\":\"23:59\",\"step\":\"00:30\"}', '00:00', 'period', 3, 1521085263, 1582678781);
INSERT INTO `AR_CONFIG` VALUES ('smsContent', '短信内容', NULL, 9, NULL, '尊敬的会员{%REAL_NAME%}！您的最迟复销充值日期是{%LAST_RECHARGE_DATE%}、您{%MONTH%}{%IS_PASS%}，请留意您的复销状态；如已交复销请忽略此短信。', 'sms', 4, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('pointsPercent', '业绩奖比例', '%', 1, NULL, '1', 'bonus', 4, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('shareRegPerson', '共享奖注册时间人数', '人', 1, NULL, '7', 'bonus', 5, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('sharePercent', '共享奖比例', '%', 1, NULL, '5', 'bonus', 6, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('parentOddPercent_0', '管理奖1/3/5代比例', '%', 1, NULL, '5', 'bonus', 7, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('parentOddPercent_1', '管理奖7/9/11代比例', '%', 1, NULL, '4', 'bonus', 8, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('parentOddPercent_2', '管理奖13/15/17代比例', '%', 1, NULL, '2', 'bonus', 9, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('smsEmpOpen', '是否开启首次达到聘级短信通知', NULL, 8, NULL, '1', 'sms', 10, 1521085263, 1522396087);
INSERT INTO `AR_CONFIG` VALUES ('parentOddPercent_3', '管理奖19/21/23代比例', '%', 1, NULL, '3', 'bonus', 10, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('smsEmp', '达到的聘级', NULL, 2, '[{\"label\":\"高级经理\",\"value\":\"1\"},{\"label\":\"合格高级经理\",\"value\":\"2\"},{\"label\":\"一钻经理\",\"value\":\"3\"},{\"label\":\"二钻经理\",\"value\":\"4\"},{\"label\":\"三钻经理\",\"value\":\"5\"},{\"label\":\"四钻经理\",\"value\":\"6\"},{\"label\":\"五钻经理\",\"value\":\"7\"},{\"label\":\"六钻经理\",\"value\":\"8\"},{\"label\":\"七钻经理\",\"value\":\"9\"},{\"label\":\"七星董事\",\"value\":\"10\"},{\"label\":\"六星董事\",\"value\":\"11\"},{\"label\":\"三星董事\",\"value\":\"12\"}]', '1,2,3,4,5,6,7,8,9,10,11,12', 'sms', 11, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('reConsumePointsPercent', '重复消费积分比例', '%', 1, NULL, '10', 'bonus', 11, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('smsEmpContent', '聘级短信内容', NULL, 9, NULL, '尊敬的会员{%REAL_NAME%}！恭喜您于{%EMP_LV_DATE%}升级到{%EMP_LV%}。', 'sms', 12, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('reConsumePointsMonthCap', '重复消费积分每月上限', '积分', 1, NULL, '1000', 'bonus', 12, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('showBonusPeriodNum', '前台可见往期奖金期数', '期', 1, NULL, '10', 'other', 13, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('manageTaxPercent', '管理费比例', '%', 1, NULL, '5', 'bonus', 13, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('showFlowPeriodNum', '前台可见交易记录期数', '期', 1, NULL, '10', 'other', 14, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('bonusTotalZeroLimit', '总收入限制(推荐0人)', '倍', 1, NULL, '1', 'bonus', 14, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('showTransferPeriodNum', '前台可见转账记录期数', '期', 1, NULL, '10', 'other', 15, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('bonusTotalOneLimit', '总收入限制(推荐1人)', '倍', 1, NULL, '2', 'bonus', 15, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('showWithdrawPeriodNum', '前台可见提现记录期数', '期', 1, NULL, '10', 'other', 16, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('bonusTotalTwoLimit', '总收入限制(推荐2人)', '倍', 1, NULL, '4', 'bonus', 16, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('sameEmpLevelPercent', '相同聘级荣衔奖比例', '%', 1, NULL, '10', 'bonus', 17, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('openQY', '是否开启团队奖', NULL, 8, NULL, '1', 'bonus', 20, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('openYC', '是否开启荣衔奖', NULL, 8, NULL, '1', 'bonus', 21, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('openBD', '是否开启报单奖', NULL, 8, NULL, '1', 'bonus', 23, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('manualWithdrawMinAmount', '手动提现最低金额', '元', 1, NULL, '100', 'other', 23, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('openTG', '是否开启推广奖', NULL, 8, NULL, '1', 'bonus', 24, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('openYJ', '是否开启业绩奖', NULL, 8, NULL, '1', 'bonus', 25, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('openGX', '是否开启共享奖', NULL, 8, NULL, '1', 'bonus', 26, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('withdrawFreezeDays', '提现预付款天数', '天', 1, NULL, '30', 'other', 26, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('openGL', '是否开启管理奖', NULL, 8, NULL, '1', 'bonus', 27, 1521085263, 1581836154);
INSERT INTO `AR_CONFIG` VALUES ('isCanWithdrawBack', '是否开启前台提现退回功能', NULL, 8, NULL, '1', 'other', 27, 1521085263, 1522396087);
INSERT INTO `AR_CONFIG` VALUES ('autoClosePeriod', '自动封期', NULL, 8, NULL, '1', 'other', 41, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('autoCalcPeriod', '自动结算', NULL, 8, NULL, '1', 'other', 42, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('isCanTransferProp', '是否开启单笔转账比例', NULL, 8, NULL, '1', 'other', 43, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('backupWeekDate', '备份星期', NULL, 2, '[{\"label\":\"星期一\",\"value\":\"1\"},{\"label\":\"星期二\",\"value\":\"2\"},{\"label\":\"星期三\",\"value\":\"3\"},{\"label\":\"星期四\",\"value\":\"4\"},{\"label\":\"星期五\",\"value\":\"5\"},{\"label\":\"星期六\",\"value\":\"6\"},{\"label\":\"星期日\",\"value\":\"0\"}]', '6', 'other', 44, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('backupTime', '备份时间', NULL, 7, '{\"start\":\"00:00\",\"end\":\"23:59\",\"step\":\"00:30\"}', '03:30', 'other', 45, 1521085263, 1524116298);
INSERT INTO `AR_CONFIG` VALUES ('historyBonusLimit', '奖金余额备份近几周', '周', 1, NULL, '5', 'other', 46, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('payPasswordRule', '支付密码规则', NULL, 2, '[{\"label\":\"无\",\"value\":\"0\"},{\"label\":\"身份证后6位\",\"value\":\"id_s_6\"},{\"label\":\"身份证前8位\",\"value\":\"id_p_8\"},{\"label\":\"用户名\",\"value\":\"user_name\"}]', 'user_name', 'other', 47, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('passwordRule', '密码规则', NULL, 2, '[{\"label\":\"无\",\"value\":\"0\"},{\"label\":\"身份证后6位\",\"value\":\"id_s_6\"},{\"label\":\"身份证前8位\",\"value\":\"id_p_8\"},{\"label\":\"用户名\",\"value\":\"user_name\"}]', '0', 'other', 48, 1521085263, 1541830796);
INSERT INTO `AR_CONFIG` VALUES ('pvRatio', 'PV比例', NULL, 1, NULL, '0.7', 'other', 49, 1521085263, 1541830796);
COMMIT;

-- ----------------------------
-- Table structure for AR_DEAL_TYPE
-- ----------------------------
DROP TABLE IF EXISTS `AR_DEAL_TYPE`;
CREATE TABLE `AR_DEAL_TYPE` (
  `ID` varchar(32) NOT NULL,
  `TYPE_NAME` varchar(255) NOT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `UPDATE_REMARK` text,
  `IS_PRESET` tinyint(1) NOT NULL DEFAULT '0',
  `IS_ENABLE` tinyint(1) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `SORT_ORDER` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='交易类型表';

-- ----------------------------
-- Records of AR_DEAL_TYPE
-- ----------------------------
BEGIN;
INSERT INTO `AR_DEAL_TYPE` VALUES ('01A753D2548F44FA99B847133C1B5F79', '提现退回', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('01C2916A2ECA4D1B9C29AA333C6D13E7', '复消积分转出', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('1145D8ABA7A7471FB59B6760BDB19019', '短信服务费', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('141E52002AAE43B7AC304F4BAEFDA268', '奖金发放', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('37B81A45F38646A0A16499AB27B51923', '补发', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('37EFF25E5E3F46A6BB84B8C55997F276', '永久关停扣除', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('6626ED606DB34A11B6CCEA768B6E36C2', '奖金提现', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('A1F1E76F34EE4981AB3BF4F8D20BB53E', '注销扣除', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('A6BDF8A2E5F7450B80CBF3B28D8010D2', '复消积分发放', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('DAA0FB1465F748908680D941D589326E', '转出', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('DB62879E6C6B4B2F8591FAD920A2822C', '转入', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
INSERT INTO `AR_DEAL_TYPE` VALUES ('F6AA8D767E654D86917BBF1A5C24F439', '复消积分转入', '65F27BCE7FD278FFE055736AECE8644D', NULL, NULL, NULL, 1, 1, 1561942800, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_DECLARATION_LEVEL
-- ----------------------------
DROP TABLE IF EXISTS `AR_DECLARATION_LEVEL`;
CREATE TABLE `AR_DECLARATION_LEVEL` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `LEVEL_NAME` varchar(48) NOT NULL COMMENT '级别名称',
  `PERF` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '累计业绩',
  `QY_PERCENT` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '区域津贴百分比',
  `QY_TOUCH_CAP` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '对碰封顶',
  `QY_BIG_CAP` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '大区封顶',
  `FX_MIN_DEEP` int(10) NOT NULL DEFAULT '1' COMMENT '复销奖拿奖最小层数',
  `FX_MAX_DEEP` int(10) NOT NULL DEFAULT '1' COMMENT '复销奖拿奖最大层数',
  `FX_PERCENT` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '复销奖百分比',
  `IS_ADJUST_GIFT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可调整礼包',
  `IS_DEC` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可以报单',
  `SORT` int(10) NOT NULL DEFAULT '0' COMMENT '级别排序',
  `CREATE_ADMIN` varchar(32) NOT NULL COMMENT '创建管理员',
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL COMMENT '更新管理员',
  `UPDATE_PERIOD` float(10,0) NOT NULL DEFAULT '0' COMMENT '更新期数',
  `ORDER_PERMISSION` text COMMENT '订单权限',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `GL_ODD_DEEP_ONE` int(10) NOT NULL DEFAULT '1' COMMENT '共享奖推荐1人拿的代数',
  `GL_ODD_DEEP_TWO` int(10) NOT NULL DEFAULT '1' COMMENT '共享奖推荐2人拿的代数',
  `GL_ODD_DEEP_THREE` int(10) NOT NULL DEFAULT '1' COMMENT '共享奖推荐3人拿的代数',
  `INCOME_CAP` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '收入上限',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `LEVEL_NAME` (`LEVEL_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='报单级别';

-- ----------------------------
-- Records of AR_DECLARATION_LEVEL
-- ----------------------------
BEGIN;
INSERT INTO `AR_DECLARATION_LEVEL` VALUES ('67ABCB8C1F7D5519E055736AECE8644D', '银钻会员', 980.00, 2.00, 15000.00, 280000.00, 1, 13, 3.00, 1, 1, 2, 'admin', 'adminx', 158, NULL, 1521358140, 1581996445, 1, 2, 6, 10000.00);
INSERT INTO `AR_DECLARATION_LEVEL` VALUES ('67ABCCE20A9F5553E055736AECE8644D', '金钻会员', 2980.00, 2.00, 30000.00, 550000.00, 1, 14, 3.00, 1, 1, 3, 'admin', 'adminx', 140, NULL, 1521358162, 1581996462, 2, 4, 9, 100000.00);
INSERT INTO `AR_DECLARATION_LEVEL` VALUES ('67ABCE0ECE705575E055736AECE8644D', 'VIP会员', 9800.00, 2.00, 80000.00, 1050000.00, 1, 17, 3.00, 1, 1, 4, 'admin', 'adminx', 158, NULL, 1521358182, 1581996473, 3, 6, 12, 200000.00);
COMMIT;

-- ----------------------------
-- Table structure for AR_DECLARATION_PACKAGE
-- ----------------------------
DROP TABLE IF EXISTS `AR_DECLARATION_PACKAGE`;
CREATE TABLE `AR_DECLARATION_PACKAGE` (
  `ID` varchar(32) NOT NULL,
  `PACKAGE_NAME` varchar(48) NOT NULL,
  `AMOUNT` float(16,2) NOT NULL DEFAULT '0.00',
  `PV` float(16,2) NOT NULL DEFAULT '0.00',
  `LEVEL_ID` varchar(32) NOT NULL,
  `PACKAGE_CONTENT` text,
  `CREATED_AT` int(10) NOT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `PACKAGE_NAME` (`PACKAGE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='报单套餐';

-- ----------------------------
-- Table structure for AR_DEC_LEVEL_LOG
-- ----------------------------
DROP TABLE IF EXISTS `AR_DEC_LEVEL_LOG`;
CREATE TABLE `AR_DEC_LEVEL_LOG` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `FROM_ID` varchar(32) NOT NULL,
  `TO_ID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `REMARK` text NOT NULL,
  `ADMIN_ID` varchar(32) NOT NULL DEFAULT '',
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `STATUS` (`STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='报单级别变动记录';

-- ----------------------------
-- Table structure for AR_DEC_ORDER
-- ----------------------------
DROP TABLE IF EXISTS `AR_DEC_ORDER`;
CREATE TABLE `AR_DEC_ORDER` (
  `ID` varchar(32) NOT NULL,
  `DEC_SN` varchar(32) NOT NULL DEFAULT '',
  `ORDER_SN` varchar(32) NOT NULL DEFAULT '',
  `USER_ID` varchar(32) NOT NULL,
  `TO_USER_ID` varchar(32) NOT NULL,
  `TYPE` varchar(32) NOT NULL,
  `IS_ADMIN` tinyint(1) NOT NULL DEFAULT '0',
  `DEC_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `DEC_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PAID_WALLET` varchar(48) NOT NULL,
  `IS_BATCH` tinyint(1) NOT NULL DEFAULT '0',
  `REMARK` text,
  `REC_USER_ID` varchar(32) DEFAULT '',
  `CON_USER_ID` varchar(32) DEFAULT '',
  `PERIOD_NUM` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `CALC_MONTH` int(8) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `UPDATER` varchar(32) DEFAULT '',
  `UPDATED_AT` varchar(32) NOT NULL DEFAULT '0',
  `IS_DEL` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `DEC_ID` varchar(32) DEFAULT '',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `DEC_SN` (`DEC_SN`) USING BTREE,
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `TYPE` (`TYPE`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `IS_DEL` (`IS_DEL`) USING BTREE,
  KEY `ORDER_SN` (`ORDER_SN`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='报单';

-- ----------------------------
-- Table structure for AR_DEC_ROLE
-- ----------------------------
DROP TABLE IF EXISTS `AR_DEC_ROLE`;
CREATE TABLE `AR_DEC_ROLE` (
  `ID` varchar(32) NOT NULL,
  `ROLE_NAME` varchar(255) NOT NULL,
  `ORDER_PERMISSION` text NOT NULL,
  `STORE_SUBSIDY` decimal(16,2) NOT NULL,
  `GOODS_SUBSIDY` decimal(16,2) NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL,
  `UPDATER` varchar(16) DEFAULT NULL,
  `ADM_NAME` varchar(16) NOT NULL,
  `GOODS_TO_USER_PROP` decimal(16,2) NOT NULL,
  `D_STORE_PERF_PROP` decimal(16,2) NOT NULL,
  `FLOW_SUBSIDY_PROP` float(10,2) DEFAULT NULL,
  `NEED_SET_AREA` tinyint(1) NOT NULL,
  `UPDATE_PERIOD` int(10) NOT NULL,
  `CREATE_ORDER_FORM` tinyint(1) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ROLE_NAME` (`ROLE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of AR_DEC_ROLE
-- ----------------------------
BEGIN;
INSERT INTO `AR_DEC_ROLE` VALUES ('16B96B8D910E44EA86C89CC80F6BC76C', '报单中心', '[\"ZC\",\"ZG\",\"LS\",\"FX\",\"DH\"]', 0.00, 0.00, 1534749214, 1571380490, 'ADMINZ', 'ADMIN', 0.00, 0.00, 0.00, 1, 153, 0);
INSERT INTO `AR_DEC_ROLE` VALUES ('466CB7E1F32349C196B88ECBDE51C059', '形象店', '[\"ZC\",\"ZG\",\"FX\",\"LS\",\"DH\"]', 4.00, 3.00, 1534749202, 1571380500, 'ADMINZ', 'ADMIN', 2.00, 0.00, 2.00, 1, 153, 1);
INSERT INTO `AR_DEC_ROLE` VALUES ('810916A06B304162902408A6B9E5D177', '区级店', '[\"ZC\",\"ZG\",\"LS\",\"FX\",\"DH\"]', 4.00, 0.00, 1534749236, 1571380696, 'ADMINZ', 'ADMIN', 2.00, 1.00, 2.00, 1, 153, 1);
INSERT INTO `AR_DEC_ROLE` VALUES ('85B65542FCC341FAAFFAD0FA625CF9B8', '服务点', '[\"ZC\",\"ZG\",\"LS\",\"FX\",\"DH\"]', 2.00, 0.00, 1534749225, 1571380719, 'ADMINZ', 'ADMIN', 2.00, 0.00, 1.00, 1, 153, 1);
INSERT INTO `AR_DEC_ROLE` VALUES ('8976C62F40064D8AB357BE07C8A3CA8F', '店铺', '[\"ZC\",\"ZG\",\"LS\",\"FX\",\"DH\"]', 4.00, 0.00, 1534748970, 1571380687, 'ADMINZ', 'ADMIN', 2.00, 0.00, 2.00, 1, 153, 1);
COMMIT;

-- ----------------------------
-- Table structure for AR_EMPLOY_LEVEL
-- ----------------------------
DROP TABLE IF EXISTS `AR_EMPLOY_LEVEL`;
CREATE TABLE `AR_EMPLOY_LEVEL` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `LEVEL_NAME` varchar(48) NOT NULL COMMENT '级别名称',
  `LOCATION_NUM` int(10) NOT NULL DEFAULT '0' COMMENT '区数量',
  `LOCATION_PERF` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '单区业绩',
  `NEW_PERF` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '新增业绩',
  `MIN_EMPLOY_LEVEL` varchar(32) DEFAULT NULL COMMENT '几个区域内分别有几个最低什么聘级的会员',
  `YC_PERCENT_ARR` text COMMENT '育成津贴比例集合',
  `CF_BASE_NUM` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '车房奖基数',
  `CF_PERCENT` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '车房奖系数',
  `LX_BASE_NUM` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '领袖奖奖基数',
  `LX_PERCENT` float(16,2) NOT NULL DEFAULT '0.00' COMMENT '领袖奖系数',
  `SORT` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `CREATE_ADMIN` varchar(32) NOT NULL COMMENT '创建管理员',
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL COMMENT '更新管理员',
  `ICON_TYPE` tinyint(1) NOT NULL DEFAULT '0' COMMENT '图表类型',
  `ICON_NUM` tinyint(2) NOT NULL DEFAULT '0' COMMENT '图标个数',
  `RX_PERCENT` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '荣衔奖比例',
  `OTHER_DEPART_PERF` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '去除最大部门，其它部门的累计推荐业绩',
  `MIN_EMPLOY_NUM` int(10) NOT NULL DEFAULT '0' COMMENT '最小聘级的数量',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `LEVEL_NAME` (`LEVEL_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='聘级';

-- ----------------------------
-- Records of AR_EMPLOY_LEVEL
-- ----------------------------
BEGIN;
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE1C6C21F81B32E055736AECE8644D', '无聘级', 0, 0.00, 0.00, NULL, '[0,0,0,0,0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 0, 1521436806, 1547104919, 'admin', NULL, 0, 0, 0.00, 0.00, 0);
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE5FE7857C216AE055736AECE8644D', '主任', 0, 70000.00, 0.00, NULL, '[0,0,0,0,0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 1, 1521437938, 1548221354, 'admin', NULL, 1, 1, 2.00, 500000.00, 0);
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE6A4D03C52288E055736AECE8644D', '经理', 2, 70000.00, 14000.00, '67BE5FE7857C216AE055736AECE8644D', '[0,0,0,0,0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 2, 1521438113, 1581997760, 'admin', 'adminx', 2, 1, 3.00, 0.00, 1);
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE6EA2070D22EBE055736AECE8644D', '高级经理', 2, 70000.00, 14000.00, '67BE6A4D03C52288E055736AECE8644D', '[\"10\",0,0,0,0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 3, 1521438185, 1581997773, 'admin', 'adminx', 2, 2, 4.00, 0.00, 1);
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE742A336F2370E055736AECE8644D', '总监', 3, 0.00, 0.00, '67BE6EA2070D22EBE055736AECE8644D', '[\"10\",\"10\",0,0,0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 4, 1521438278, 1581997787, 'admin', 'adminx', 3, 1, 4.50, 0.00, 1);
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE805032C22492E055736AECE8644D', '高级总监', 3, 0.00, 0.00, '67BE742A336F2370E055736AECE8644D', '[\"10\",\"10\",\"10\",0,0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 5, 1521438482, 1581997806, 'admin', 'adminx', 3, 2, 5.00, 0.00, 1);
INSERT INTO `AR_EMPLOY_LEVEL` VALUES ('67BE82019BE524CAE055736AECE8644D', '首席总监', 3, 0.00, 0.00, '67BE742A336F2370E055736AECE8644D', '[\"10\",\"10\",\"10\",\"5\",0,0,0,0,0,0]', 0.00, 0.00, 0.00, 0.00, 6, 1521438510, 1581997817, 'admin', 'adminx', 3, 3, 0.00, 0.00, 2);
COMMIT;

-- ----------------------------
-- Table structure for AR_EMPLOY_LEVEL_LOG
-- ----------------------------
DROP TABLE IF EXISTS `AR_EMPLOY_LEVEL_LOG`;
CREATE TABLE `AR_EMPLOY_LEVEL_LOG` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `FROM_ID` varchar(32) NOT NULL,
  `TO_ID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='聘级变动记录表';

-- ----------------------------
-- Table structure for AR_EXCEL_ADD_USER
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXCEL_ADD_USER`;
CREATE TABLE `AR_EXCEL_ADD_USER` (
  `ID` varchar(32) NOT NULL,
  `EXCEL_IMPORT_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(32) DEFAULT NULL,
  `DEC_LV` varchar(32) DEFAULT NULL,
  `REAL_NAME` varchar(32) DEFAULT NULL,
  `ID_CARD` varchar(32) DEFAULT NULL,
  `MOBILE` varchar(32) DEFAULT NULL,
  `TEL` varchar(32) DEFAULT NULL,
  `AREA_PROVINCE` varchar(32) DEFAULT NULL,
  `AREA_CITY` varchar(32) DEFAULT NULL,
  `AREA_COUNTY` varchar(32) DEFAULT NULL,
  `ADDRESS` varchar(32) DEFAULT NULL,
  `OPEN_BANK` varchar(32) DEFAULT NULL,
  `BANK_ADDRESS` varchar(32) DEFAULT NULL,
  `BANK_NO` varchar(32) DEFAULT NULL,
  `BANK_PROVINCE` varchar(32) DEFAULT NULL,
  `BANK_CITY` varchar(32) DEFAULT NULL,
  `BANK_COUNTY` varchar(32) DEFAULT NULL,
  `IS_DEC` varchar(32) DEFAULT NULL,
  `DEC_ROLE` varchar(32) DEFAULT NULL,
  `DEC_USER_NAME` varchar(32) DEFAULT NULL,
  `BIRTHDAY` varchar(32) DEFAULT NULL,
  `CON_USER_NAME` varchar(32) DEFAULT NULL,
  `REC_USER_NAME` varchar(32) DEFAULT NULL,
  `LOCATION` varchar(32) DEFAULT NULL,
  `SORT` int(10) NOT NULL,
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ERROR_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='空单录入待导入表';

-- ----------------------------
-- Table structure for AR_EXCEL_CHANGE_BALANCE
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXCEL_CHANGE_BALANCE`;
CREATE TABLE `AR_EXCEL_CHANGE_BALANCE` (
  `ID` varchar(32) NOT NULL,
  `EXCEL_IMPORT_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `REAL_NAME` varchar(32) NOT NULL,
  `TYPE` varchar(20) NOT NULL,
  `AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `DEAL_TYPE` varchar(128) NOT NULL,
  `REMARK` varchar(2000) DEFAULT '',
  `REMARK_IS_SHOW` tinyint(1) NOT NULL DEFAULT '0',
  `SORT` int(5) NOT NULL DEFAULT '0',
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ERROR_REMARK` varchar(1000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='调整会员余额待导入表';

-- ----------------------------
-- Table structure for AR_EXCEL_IMPORT
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXCEL_IMPORT`;
CREATE TABLE `AR_EXCEL_IMPORT` (
  `ID` varchar(32) NOT NULL,
  `OPTION_NAME` varchar(32) NOT NULL,
  `TABLE_NAME` varchar(32) DEFAULT NULL,
  `UPLOAD_ID` varchar(32) DEFAULT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `IMPORT_ADMIN_ID` varchar(32) NOT NULL,
  `AUDIT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Excel导入记录';

-- ----------------------------
-- Table structure for AR_EXCEL_REG_INFO
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXCEL_REG_INFO`;
CREATE TABLE `AR_EXCEL_REG_INFO` (
  `ID` varchar(32) NOT NULL,
  `EXCEL_IMPORT_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(32) DEFAULT NULL,
  `REAL_NAME` varchar(32) DEFAULT NULL,
  `ID_CARD` varchar(32) DEFAULT NULL,
  `REG_TYPE` varchar(32) DEFAULT NULL,
  `REG_NAME` varchar(255) DEFAULT NULL,
  `CREDIT_CODE` varchar(255) DEFAULT NULL,
  `PREMISES` varchar(255) DEFAULT NULL,
  `REG_EXPIRES` varchar(255) DEFAULT NULL,
  `LEGAL_PERSON` varchar(255) DEFAULT NULL,
  `OPEN_NAME` varchar(255) DEFAULT NULL,
  `OPEN_BANK` varchar(255) DEFAULT NULL,
  `BANK_ADDRESS` varchar(255) DEFAULT NULL,
  `BANK_NO` varchar(32) DEFAULT NULL,
  `BANK_PROVINCE` varchar(32) DEFAULT NULL,
  `BANK_CITY` varchar(32) DEFAULT NULL,
  `BANK_COUNTY` varchar(32) DEFAULT NULL,
  `REMARK` text,
  `SORT` int(10) NOT NULL,
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ERROR_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='注册信息待导入表';

-- ----------------------------
-- Table structure for AR_EXCEL_WITHDRAW_PAID_FALSE
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXCEL_WITHDRAW_PAID_FALSE`;
CREATE TABLE `AR_EXCEL_WITHDRAW_PAID_FALSE` (
  `ID` varchar(32) NOT NULL,
  `EXCEL_IMPORT_ID` varchar(32) NOT NULL,
  `SN` varchar(32) NOT NULL,
  `WITHDRAW_PERIOD_NUM` int(10) NOT NULL DEFAULT '0',
  `PAID_AT` varchar(32) NOT NULL DEFAULT '',
  `PAID_FAIL_REMARK` varchar(1000) DEFAULT '',
  `USER_NAME` varchar(16) NOT NULL,
  `REAL_NAME` varchar(32) NOT NULL,
  `AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `BANK_REAL_NAME` varchar(255) NOT NULL,
  `BANK_NO` varchar(32) NOT NULL,
  `SORT` int(5) NOT NULL DEFAULT '0',
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ERROR_REMARK` varchar(1000) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  KEY `EXCEL_IMPORT_ID` (`EXCEL_IMPORT_ID`) USING BTREE,
  KEY `USER_NAME` (`USER_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='提现标记失败待导入表';

-- ----------------------------
-- Table structure for AR_EXPORT
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXPORT`;
CREATE TABLE `AR_EXPORT` (
  `ID` varchar(32) NOT NULL,
  `EXPORT_NAME` varchar(255) NOT NULL,
  `MODULE_NAME` varchar(255) NOT NULL,
  `REMARK` varchar(255) DEFAULT NULL,
  `IS_EXPORTING` tinyint(1) NOT NULL DEFAULT '0',
  `ADMIN_ID` varchar(32) DEFAULT NULL,
  `EXPORT_PERCENT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `STARTED_AT` int(10) NOT NULL DEFAULT '0',
  `ENDED_AT` int(10) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `FILE_NAME` varchar(255) DEFAULT '',
  `REMOTE_URL` varchar(2000) DEFAULT '',
  `FILE_SIZE` bigint(16) NOT NULL DEFAULT '0',
  `UPDATER` varchar(16) DEFAULT NULL,
  `UPDATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `EXPORT_NAME` (`EXPORT_NAME`) USING BTREE,
  KEY `MODULE_NAME` (`MODULE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='导出表';

-- ----------------------------
-- Table structure for AR_EXPORT_FILE
-- ----------------------------
DROP TABLE IF EXISTS `AR_EXPORT_FILE`;
CREATE TABLE `AR_EXPORT_FILE` (
  `ID` varchar(32) NOT NULL,
  `FILE_NAME` varchar(255) NOT NULL,
  `EXPORT_ID` varchar(32) NOT NULL,
  `URL` varchar(1000) DEFAULT NULL,
  `FILE_SIZE` varchar(255) DEFAULT NULL,
  `MD5` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `FILE_NAME` (`FILE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='导出文件表';

-- ----------------------------
-- Table structure for AR_FLOW_BONUS
-- ----------------------------
DROP TABLE IF EXISTS `AR_FLOW_BONUS`;
CREATE TABLE `AR_FLOW_BONUS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CALC_ID` varchar(32) DEFAULT NULL,
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `IS_INCR` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `REMARK_IS_SHOW` tinyint(1) NOT NULL DEFAULT '1',
  `DEAL_TYPE_ID` varchar(32) DEFAULT NULL,
  `DEAL_TYPE_IS_PRESET` tinyint(1) NOT NULL DEFAULT '1',
  `ADMIN_NAME` varchar(32) DEFAULT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `TRANSFER_SN` varchar(32) DEFAULT '',
  `SORT` int(10) NOT NULL DEFAULT '0',
  `AUTO_SORT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='总奖金流水';

-- ----------------------------
-- Table structure for AR_FLOW_CF
-- ----------------------------
DROP TABLE IF EXISTS `AR_FLOW_CF`;
CREATE TABLE `AR_FLOW_CF` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `IS_INCR` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `REMARK_IS_SHOW` tinyint(1) NOT NULL DEFAULT '1',
  `DEAL_TYPE_ID` varchar(32) DEFAULT NULL,
  `DEAL_TYPE_IS_PRESET` tinyint(1) NOT NULL DEFAULT '1',
  `ADMIN_NAME` varchar(32) DEFAULT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='车房养老奖流水';

-- ----------------------------
-- Table structure for AR_FLOW_DEDUCT_ZR
-- ----------------------------
DROP TABLE IF EXISTS `AR_FLOW_DEDUCT_ZR`;
CREATE TABLE `AR_FLOW_DEDUCT_ZR` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ZR` decimal(16,3) NOT NULL DEFAULT '0.000',
  `LOGS` varchar(2000) DEFAULT '',
  `SURPLUS_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='责任业绩扣除记录';

-- ----------------------------
-- Table structure for AR_FLOW_LX
-- ----------------------------
DROP TABLE IF EXISTS `AR_FLOW_LX`;
CREATE TABLE `AR_FLOW_LX` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `IS_INCR` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `REMARK_IS_SHOW` tinyint(1) NOT NULL DEFAULT '1',
  `DEAL_TYPE_ID` varchar(32) DEFAULT NULL,
  `DEAL_TYPE_IS_PRESET` tinyint(1) NOT NULL DEFAULT '1',
  `ADMIN_NAME` varchar(32) DEFAULT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='领袖分红奖流水';

-- ----------------------------
-- Table structure for AR_FLOW_RECONSUME_POINTS
-- ----------------------------
DROP TABLE IF EXISTS `AR_FLOW_RECONSUME_POINTS`;
CREATE TABLE `AR_FLOW_RECONSUME_POINTS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `IS_INCR` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `REMARK_IS_SHOW` tinyint(1) NOT NULL DEFAULT '1',
  `DEAL_TYPE_ID` varchar(32) DEFAULT NULL,
  `DEAL_TYPE_IS_PRESET` tinyint(1) NOT NULL DEFAULT '1',
  `ADMIN_NAME` varchar(32) DEFAULT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='重消积分流水';

-- ----------------------------
-- Table structure for AR_FLOW_WALLET
-- ----------------------------
DROP TABLE IF EXISTS `AR_FLOW_WALLET`;
CREATE TABLE `AR_FLOW_WALLET` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `CALC_ID` varchar(32) DEFAULT NULL,
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `IS_INCR` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `ADMIN_NAME` varchar(32) DEFAULT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `SORT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='现金钱包流水';

-- ----------------------------
-- Table structure for AR_HISTORY_BONUS
-- ----------------------------
DROP TABLE IF EXISTS `AR_HISTORY_BONUS`;
CREATE TABLE `AR_HISTORY_BONUS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(32) NOT NULL,
  `REAL_NAME` varchar(32) NOT NULL,
  `DEC_LV` varchar(32) NOT NULL,
  `EMP_LV` varchar(32) NOT NULL,
  `IS_DEC` tinyint(1) NOT NULL DEFAULT '0',
  `DEC_ROLE_ID` varchar(32) DEFAULT '',
  `SYSTEM_NAME` varchar(32) DEFAULT '',
  `BONUS` decimal(16,2) NOT NULL DEFAULT '0.00',
  `CF` decimal(16,2) NOT NULL DEFAULT '0.00',
  `LX` decimal(16,2) NOT NULL DEFAULT '0.00',
  `WITHDRAW` decimal(16,2) NOT NULL DEFAULT '0.00',
  `WITHDRAW_TAX` decimal(16,2) NOT NULL DEFAULT '0.00',
  `WITHDRAW_DEDUCT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `WITHDRAW_REAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `WITHDRAW_FAIL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `USER_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `USER_STATUS_AT` int(10) NOT NULL DEFAULT '0',
  `HIGHEST_EMP_LV` varchar(32) DEFAULT '',
  `PERIOD_AT` varchar(32) DEFAULT '',
  `DEC_DEC_ROLE_ID` varchar(32) DEFAULT '',
  `DEC_USER_NAME` varchar(32) DEFAULT '',
  `DEC_REAL_NAME` varchar(32) DEFAULT '',
  `MOBILE` varchar(11) DEFAULT '',
  `TEL` varchar(11) DEFAULT '',
  `PROVINCE` int(10) NOT NULL DEFAULT '0',
  `CITY` int(10) NOT NULL DEFAULT '0',
  `COUNTY` int(10) NOT NULL DEFAULT '0',
  `SUB_COM_ID` varchar(32) DEFAULT '',
  `IS_DIRECT_SELLER` tinyint(1) NOT NULL DEFAULT '0',
  `BACKUP_AT` int(10) NOT NULL DEFAULT '0',
  `PARTITION_DATE` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='历史奖金余额';

-- ----------------------------
-- Table structure for AR_INVOICE_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_INVOICE_AUDIT`;
CREATE TABLE `AR_INVOICE_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `WITHDRAW_ID` varchar(32) NOT NULL,
  `INVOICE_CODE` varchar(255) NOT NULL,
  `INVOICE_NUM` varchar(255) NOT NULL,
  `INVOICE_DATE` varchar(255) NOT NULL,
  `AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `TAX_RATE` varchar(10) DEFAULT NULL,
  `PURCHASER_NAME` varchar(255) NOT NULL,
  `PURCHASER_REGISTER_NUM` varchar(255) NOT NULL,
  `PURCHASER_ADDRESS` varchar(255) NOT NULL,
  `PURCHASER_BANK` varchar(255) NOT NULL,
  `SELLER_NAME` varchar(255) NOT NULL,
  `SELLER_REGISTER_NUM` varchar(255) NOT NULL,
  `SELLER_ADDRESS` varchar(255) NOT NULL,
  `SELLER_BANK` varchar(255) NOT NULL,
  `ITEM_NAME` varchar(255) NOT NULL,
  `INVOICE_REMARK` varchar(255) DEFAULT NULL,
  `UPLOAD_ID` varchar(255) DEFAULT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) DEFAULT NULL,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `INVOICE_NUM` (`INVOICE_NUM`) USING BTREE,
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发票审核表';

-- ----------------------------
-- Table structure for AR_INVOICE_BALANCE_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_INVOICE_BALANCE_AUDIT`;
CREATE TABLE `AR_INVOICE_BALANCE_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发票余额审核表';

-- ----------------------------
-- Table structure for AR_INVOICE_FLOW
-- ----------------------------
DROP TABLE IF EXISTS `AR_INVOICE_FLOW`;
CREATE TABLE `AR_INVOICE_FLOW` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `REAL_NAME` varchar(128) NOT NULL,
  `DEC_LV` varchar(32) NOT NULL,
  `EMP_LV` varchar(32) NOT NULL,
  `MOBILE` varchar(32) NOT NULL,
  `REG_TYPE` varchar(32) NOT NULL,
  `REG_NAME` varchar(255) NOT NULL,
  `CREDIT_CODE` varchar(255) NOT NULL,
  `SALE_NAME` varchar(255) DEFAULT NULL,
  `TAXPAYER_NUMBER` varchar(255) DEFAULT NULL,
  `INVOICE_ACCOUNT` varchar(255) NOT NULL,
  `INVOICE_SN` varchar(255) DEFAULT NULL,
  `TAX_ACCOUNT` varchar(255) NOT NULL,
  `OUTED_AT` int(10) NOT NULL DEFAULT '0',
  `DEDUCT_PERIOD_NUM` bigint(32) NOT NULL DEFAULT '0',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  `WITHDRAW_SN` varchar(255) DEFAULT NULL,
  `IS_INCR` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `CREATE_REMARK` text,
  `CREATE_TIME` int(10) NOT NULL,
  `AUDIT_ADMIN` varchar(32) NOT NULL,
  `AUDIT_REMARK` text,
  `AUDIT_TIME` int(10) NOT NULL,
  `P_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发票交易记录表';

-- ----------------------------
-- Table structure for AR_MESSAGE
-- ----------------------------
DROP TABLE IF EXISTS `AR_MESSAGE`;
CREATE TABLE `AR_MESSAGE` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `TEXT_ID` varchar(32) NOT NULL,
  `IS_READ` tinyint(1) NOT NULL DEFAULT '0',
  `IS_DEL` tinyint(1) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `READ_AT` int(10) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `IS_READ` (`IS_READ`) USING BTREE,
  KEY `IS_DEL` (`IS_DEL`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='站内信';

-- ----------------------------
-- Table structure for AR_MESSAGE_TEXT
-- ----------------------------
DROP TABLE IF EXISTS `AR_MESSAGE_TEXT`;
CREATE TABLE `AR_MESSAGE_TEXT` (
  `ID` varchar(32) NOT NULL,
  `TITLE` varchar(48) NOT NULL,
  `CONTENT` text NOT NULL,
  `TO_UID` varchar(32) NOT NULL DEFAULT '0',
  `IS_DEL` tinyint(1) NOT NULL DEFAULT '0',
  `ADMIN_ID` varchar(32) NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `TO_UID` (`TO_UID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='站内信内容';

-- ----------------------------
-- Table structure for AR_OCR_API
-- ----------------------------
DROP TABLE IF EXISTS `AR_OCR_API`;
CREATE TABLE `AR_OCR_API` (
  `ID` varchar(32) NOT NULL,
  `API_NAME` varchar(48) NOT NULL,
  `DESCRIPTION` varchar(255) NOT NULL,
  `CONFIG` text,
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `API_NAME` (`API_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='OCR识别接口表';

-- ----------------------------
-- Records of AR_OCR_API
-- ----------------------------
BEGIN;
INSERT INTO `AR_OCR_API` VALUES ('5955B56B0C0E465E8F0E65FBF86E5D44', 'baidu', '百度OCR识别', NULL, 1, '65F27BCE7FD278FFE055736AECE8644D', NULL, 1526960820, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_OPEN_BANK
-- ----------------------------
DROP TABLE IF EXISTS `AR_OPEN_BANK`;
CREATE TABLE `AR_OPEN_BANK` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `BANK_NAME` varchar(64) NOT NULL COMMENT '银行名称',
  `BANK_CODE` varchar(32) NOT NULL COMMENT '银行代码',
  `LIST_ORDER` int(5) NOT NULL DEFAULT '0' COMMENT '排序',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '修改时间',
  `ADM_NAME` varchar(16) NOT NULL COMMENT '操作人',
  `MIN_CHARGE` float(10,2) NOT NULL DEFAULT '0.00' COMMENT '最低手续费',
  `MAX_CHARGE` float(10,2) NOT NULL DEFAULT '0.00' COMMENT '最高手续费',
  `CHARGE_PROP` float(10,2) NOT NULL DEFAULT '0.00' COMMENT '手续费比例',
  `UPDATER` varchar(16) DEFAULT '' COMMENT '修改人',
  `STATUS` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `BANK_CODE` (`BANK_CODE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开户行';

-- ----------------------------
-- Records of AR_OPEN_BANK
-- ----------------------------
BEGIN;
INSERT INTO `AR_OPEN_BANK` VALUES ('95A71AF5E4D55466E053693418ACED88', '123', '11111111', 0, 1571915532, 1572345780, 'CN0006', 0.00, 0.00, 0.00, 'ADMIN', 1);
INSERT INTO `AR_OPEN_BANK` VALUES ('960B4CAB7C07769CE053693418ACF6F7', '农业银行', '123456', 0, 1572345863, 0, 'ADMIN', 0.00, 0.00, 0.00, NULL, 1);
INSERT INTO `AR_OPEN_BANK` VALUES ('960B4D9367C776B7E053693418ACFCC1', '中国银行', '4566999', 0, 1572345878, 1573182295, 'ADMIN', 0.00, 0.00, 0.00, 'LIMIN', 1);
INSERT INTO `AR_OPEN_BANK` VALUES ('960B6924E1527B02E053693418AC2B0A', '民生银行', '456789', 0, 1572346341, 0, 'ADMIN', 0.00, 0.00, 0.00, NULL, 1);
INSERT INTO `AR_OPEN_BANK` VALUES ('960B6BDE22667B67E053693418ACF2B7', '招商银行', '789666', 0, 1572346386, 0, 'ADMIN', 0.00, 0.00, 0.00, NULL, 1);
INSERT INTO `AR_OPEN_BANK` VALUES ('960B7BDF35E67F01E053693418AC3102', '上海银行', '88585585', 0, 1572346655, 0, 'ADMIN', 0.00, 0.00, 0.00, NULL, 1);
INSERT INTO `AR_OPEN_BANK` VALUES ('9632D2ECCB120E33E053693418AC891C', '建设银行', '11111112', 0, 1572515619, 0, 'ADMINZ', 0.00, 0.00, 0.00, NULL, 1);
COMMIT;

-- ----------------------------
-- Table structure for AR_ORDER
-- ----------------------------
DROP TABLE IF EXISTS `AR_ORDER`;
CREATE TABLE `AR_ORDER` (
  `ID` varchar(32) NOT NULL,
  `SN` varchar(32) NOT NULL DEFAULT '',
  `DEC_SN` varchar(32) DEFAULT '',
  `USER_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `ORDER_TYPE` varchar(12) NOT NULL,
  `ORDER_AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PAY_AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PAY_PV` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PAY_AT` int(10) NOT NULL DEFAULT '0',
  `FREIGHT` float(10,2) NOT NULL DEFAULT '0.00',
  `PAY_FREIGHT` float(10,2) NOT NULL DEFAULT '0.00',
  `DELIVERY_STATUS` tinyint(2) NOT NULL DEFAULT '0',
  `DELIVERY_PERIOD` int(10) NOT NULL DEFAULT '0',
  `DELIVERY_AT` int(10) NOT NULL DEFAULT '0',
  `EXPRESS_COMPANY` varchar(128) DEFAULT '',
  `ORDER_TRACK_NO` varchar(32) DEFAULT '',
  `EXPRESS_TYPE` tinyint(1) NOT NULL DEFAULT '0',
  `FRONT_REMARK` varchar(1000) DEFAULT '',
  `REMARK` text,
  `PERIOD_NUM` int(10) NOT NULL DEFAULT '0',
  `STATUS` int(3) NOT NULL DEFAULT '0',
  `CONSIGNEE` varchar(120) DEFAULT '',
  `MOBILE` varchar(11) DEFAULT '',
  `TEL` varchar(16) DEFAULT '',
  `PROVINCE` int(6) NOT NULL DEFAULT '0',
  `CITY` int(6) NOT NULL DEFAULT '0',
  `COUNTY` int(6) NOT NULL DEFAULT '0',
  `ADDRESS` varchar(255) NOT NULL DEFAULT '',
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `CREATE_USER` varchar(16) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATER` varchar(16) DEFAULT '',
  `IS_DELETE` int(10) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `PAY_TYPE` varchar(32) NOT NULL DEFAULT 'cash',
  PRIMARY KEY (`ID`),
  KEY `SN` (`SN`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `IS_DELETE` (`IS_DELETE`) USING BTREE,
  KEY `ORDER_TYPE` (`ORDER_TYPE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品订单';

-- ----------------------------
-- Table structure for AR_ORDER_GOODS
-- ----------------------------
DROP TABLE IF EXISTS `AR_ORDER_GOODS`;
CREATE TABLE `AR_ORDER_GOODS` (
  `ID` varchar(32) NOT NULL,
  `ORDER_SN` varchar(32) NOT NULL,
  `GOODS_ID` varchar(32) NOT NULL,
  `GOODS_TITLE` varchar(255) NOT NULL,
  `PRICE` decimal(16,2) NOT NULL DEFAULT '0.00',
  `REAL_PRICE` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV` decimal(16,2) NOT NULL DEFAULT '0.00',
  `REAL_PV` decimal(16,2) NOT NULL DEFAULT '0.00',
  `SKU_CODE` varchar(16) NOT NULL,
  `BUY_NUMS` int(10) NOT NULL DEFAULT '0',
  `P_CALC_MONTH` date NOT NULL,
  `POINT` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `GOODS_ID` (`GOODS_ID`) USING BTREE,
  KEY `ORDER_SN` (`ORDER_SN`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单中包含的商品';

-- ----------------------------
-- Table structure for AR_PERF_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_PERF_AUDIT`;
CREATE TABLE `AR_PERF_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `PV_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_LS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERF_TYPE` tinyint(1) NOT NULL DEFAULT '0',
  `PERF_LOCATION` tinyint(1) NOT NULL DEFAULT '1',
  `PERF_BEFORE` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERF_AFTER` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL DEFAULT '0',
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) DEFAULT '',
  `REMARK` text,
  `AUDIT_ADMIN` varchar(32) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='调整业绩审核表';

-- ----------------------------
-- Table structure for AR_PERF_COMPANY
-- ----------------------------
DROP TABLE IF EXISTS `AR_PERF_COMPANY`;
CREATE TABLE `AR_PERF_COMPANY` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `PV` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '月总业绩',
  `CALC_YEAR` int(10) NOT NULL COMMENT '结算年',
  `CALC_MONTH` int(10) NOT NULL COMMENT '结算月',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`ID`),
  KEY `CALC_YEAR` (`CALC_YEAR`),
  KEY `CALC_MONTH` (`CALC_MONTH`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公司总业绩';

-- ----------------------------
-- Table structure for AR_PERF_MONTH
-- ----------------------------
DROP TABLE IF EXISTS `AR_PERF_MONTH`;
CREATE TABLE `AR_PERF_MONTH` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `USER_ID` varchar(32) NOT NULL COMMENT '会员ID',
  `LAST_DEC_LV` varchar(32) DEFAULT '' COMMENT '结算时会员级别',
  `LAST_EMP_LV` varchar(32) DEFAULT '' COMMENT '结算时会员聘级',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0' COMMENT '个人消费',
  `PV_PCS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场业绩',
  `PV_1L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场业绩',
  `PV_2L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场业绩',
  `PV_3L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场业绩',
  `PV_4L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场业绩',
  `PV_5L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场历史累计加该月业绩',
  `PV_1L_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场历史累计加该月业绩',
  `PV_2L_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场历史累计加该月业绩',
  `PV_3L_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场历史累计加该月业绩',
  `PV_4L_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场历史累计加该月业绩',
  `PV_5L_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场历史累计加该月业绩',
  `CF_PERCENT` int(10) NOT NULL DEFAULT '0' COMMENT '车房养老奖分工系数',
  `LX_PERCENT` int(10) NOT NULL DEFAULT '0' COMMENT '领袖分红分工系数',
  `FX_STATUS` tinyint(1) NOT NULL DEFAULT '0' COMMENT '本月复销状态作为下月发奖资格',
  `CALC_MONTH` int(10) NOT NULL COMMENT '结算月',
  `P_CALC_MONTH` date NOT NULL COMMENT '表分区日期索引',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `PV_PSS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PV_PSS_TOTAL` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`),
  KEY `LAST_EMP_LV` (`LAST_EMP_LV`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='月业绩记录';

-- ----------------------------
-- Table structure for AR_PERF_ORDER
-- ----------------------------
DROP TABLE IF EXISTS `AR_PERF_ORDER`;
CREATE TABLE `AR_PERF_ORDER` (
  `ID` varchar(32) NOT NULL,
  `SN` varchar(32) NOT NULL,
  `DEC_SN` varchar(32) DEFAULT NULL,
  `DEC_TYPE` varchar(32) NOT NULL,
  `DEC_STATUS` tinyint(1) DEFAULT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) DEFAULT '0',
  `LAST_REC_USER_NAME` varchar(16) DEFAULT '',
  `LAST_REC_REAL_NAME` varchar(128) DEFAULT '',
  `PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `DEC_AMOUNT` float(16,2) NOT NULL DEFAULT '0.00',
  `LAST_SUB_COM_ID` varchar(32) DEFAULT '',
  `LAST_PROVINCE` int(6) DEFAULT '0',
  `LAST_CITY` int(6) DEFAULT '0',
  `LAST_COUNTY` int(6) DEFAULT '0',
  `DEC_USER_ID` varchar(32) DEFAULT '',
  `LAST_DEC_DEC_LV` varchar(32) DEFAULT '',
  `LAST_DEC_SUB_COM_ID` varchar(32) DEFAULT '',
  `LAST_DEC_PROVINCE` int(6) DEFAULT '0',
  `LAST_DEC_CITY` int(6) DEFAULT '0',
  `LAST_DEC_COUNTY` int(6) DEFAULT '0',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `CLOSED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `SN` (`SN`) USING BTREE,
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `DEC_USER_ID` (`DEC_USER_ID`) USING BTREE,
  KEY `DEC_TYPE` (`DEC_TYPE`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='业绩单';

-- ----------------------------
-- Table structure for AR_PERF_PERIOD
-- ----------------------------
DROP TABLE IF EXISTS `AR_PERF_PERIOD`;
CREATE TABLE `AR_PERF_PERIOD` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `USER_ID` varchar(32) NOT NULL COMMENT '会员ID',
  `LAST_DEC_LV` varchar(32) DEFAULT '' COMMENT '结算时会员级别',
  `LAST_EMP_LV` varchar(32) DEFAULT '' COMMENT '结算时会员聘级',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0' COMMENT '结算时会有状态',
  `PV_PCS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '个人消费',
  `PV_PCS_ZC` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '个人消费注册单',
  `PV_PCS_YH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '个人消费优惠单',
  `PV_PCS_ZG` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '个人消费增购单',
  `PV_PCS_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '个人消费零售单',
  `PV_PCS_FX` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '个人消费复销单',
  `PV_1L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场业绩',
  `PV_1L_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场对碰业绩',
  `PV_1L_ZC` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场注册单业绩',
  `PV_1L_YH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场优惠单业绩',
  `PV_1L_ZG` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场增购单业绩',
  `PV_1L_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场零售单业绩',
  `PV_1L_FX` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场复销单业绩',
  `PV_2L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场业绩',
  `PV_2L_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场对碰业绩',
  `PV_2L_ZC` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场注册单业绩',
  `PV_2L_YH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场优惠单业绩',
  `PV_2L_ZG` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场增购单业绩',
  `PV_2L_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场零售单业绩',
  `PV_2L_FX` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场复销单业绩',
  `PV_3L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场业绩',
  `PV_3L_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场对碰业绩',
  `PV_3L_ZC` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场优惠单业绩',
  `PV_3L_YH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场优惠单业绩',
  `PV_3L_ZG` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场增购单业绩',
  `PV_3L_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场零售单业绩',
  `PV_3L_FX` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场复销单业绩',
  `PV_4L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场业绩',
  `PV_4L_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场对碰业绩',
  `PV_4L_ZC` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场优惠单业绩',
  `PV_4L_YH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场优惠单业绩',
  `PV_4L_ZG` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场增购单业绩',
  `PV_4L_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场零售单业绩',
  `PV_4L_FX` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场复销单业绩',
  `PV_5L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场业绩',
  `PV_5L_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场对碰业绩',
  `PV_5L_ZC` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场优惠单业绩',
  `PV_5L_YH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场优惠单业绩',
  `PV_5L_ZG` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场增购单业绩',
  `PV_5L_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场零售单业绩',
  `PV_5L_FX` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场复销单业绩',
  `PV_LS_TOUCH` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '隐藏零售区业绩30%后的',
  `SURPLUS_1L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '一市场结余业绩',
  `SURPLUS_2L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '二市场结余业绩',
  `SURPLUS_3L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '三市场结余业绩',
  `SURPLUS_4L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '四市场结余业绩',
  `SURPLUS_5L` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '五市场结余业绩',
  `SURPLUS_LS` decimal(16,3) NOT NULL DEFAULT '0.000' COMMENT '零售隐藏区结余业绩',
  `PERIOD_NUM` int(10) NOT NULL COMMENT '期数',
  `CALC_MONTH` int(10) NOT NULL COMMENT '结算月YYYYMM',
  `P_CALC_MONTH` date NOT NULL COMMENT '表分区日期索引',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `PV_PSS` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `CALC_MONTH` (`CALC_MONTH`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='业绩记录';

-- ----------------------------
-- Table structure for AR_PERIOD
-- ----------------------------
DROP TABLE IF EXISTS `AR_PERIOD`;
CREATE TABLE `AR_PERIOD` (
  `ID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` tinyint(2) NOT NULL,
  `CALC_YEAR` int(4) NOT NULL,
  `START_TIME` int(10) NOT NULL,
  `END_TIME` int(10) NOT NULL,
  `IS_MONTH` tinyint(1) NOT NULL DEFAULT '0',
  `IS_YEAR` tinyint(1) NOT NULL DEFAULT '0',
  `IS_CLOSED` tinyint(1) NOT NULL DEFAULT '0',
  `IS_PERFED` tinyint(1) NOT NULL DEFAULT '0',
  `IS_CALCULATED` tinyint(1) NOT NULL DEFAULT '0',
  `IS_SENT` tinyint(1) NOT NULL DEFAULT '0',
  `IS_PERFING` tinyint(1) NOT NULL DEFAULT '0',
  `IS_CALCING` tinyint(1) NOT NULL DEFAULT '0',
  `IS_SENDING` tinyint(1) NOT NULL DEFAULT '0',
  `PERF_PERCENT` int(3) NOT NULL DEFAULT '0',
  `CALC_PERCENT` int(3) NOT NULL DEFAULT '0',
  `SENT_PERCENT` int(3) NOT NULL DEFAULT '0',
  `PERF_ADMIN_ID` varchar(32) DEFAULT NULL,
  `CLOSE_ADMIN_ID` varchar(32) DEFAULT NULL,
  `CALC_ADMIN_ID` varchar(32) DEFAULT NULL,
  `SENT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `CLOSED_AT` int(10) DEFAULT NULL,
  `PERF_STARTED_AT` int(10) NOT NULL DEFAULT '0',
  `PERFED_AT` int(10) NOT NULL DEFAULT '0',
  `CALCULATE_STARTED_AT` int(10) NOT NULL DEFAULT '0',
  `CALCULATED_AT` int(10) NOT NULL DEFAULT '0',
  `SEND_STARTED_AT` int(10) NOT NULL DEFAULT '0',
  `SENT_AT` int(10) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `IS_CLOSED` (`IS_CLOSED`) USING BTREE,
  KEY `IS_PERFED` (`IS_PERFED`) USING BTREE,
  KEY `IS_CALCULATED` (`IS_CALCULATED`) USING BTREE,
  KEY `IS_SENT` (`IS_SENT`) USING BTREE,
  KEY `IS_PERFING` (`IS_PERFING`) USING BTREE,
  KEY `IS_CALCING` (`IS_CALCING`) USING BTREE,
  KEY `IS_SENDING` (`IS_SENDING`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='期数';

-- ----------------------------
-- Table structure for AR_RECEIVE_ADDRESS
-- ----------------------------
DROP TABLE IF EXISTS `AR_RECEIVE_ADDRESS`;
CREATE TABLE `AR_RECEIVE_ADDRESS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `CONSIGNEE` varchar(120) NOT NULL,
  `MOBILE` varchar(11) NOT NULL,
  `PROVINCE` int(6) NOT NULL,
  `CITY` int(6) NOT NULL,
  `COUNTY` int(6) NOT NULL,
  `ADDRESS` varchar(255) NOT NULL,
  `IS_DEFAULT` tinyint(1) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATER` varchar(10) DEFAULT '',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `USER_NAME` (`USER_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收货地址';

-- ----------------------------
-- Table structure for AR_RECHARGE
-- ----------------------------
DROP TABLE IF EXISTS `AR_RECHARGE`;
CREATE TABLE `AR_RECHARGE` (
  `ID` varchar(32) NOT NULL,
  `SN` varchar(32) DEFAULT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `ID_CARD` varchar(20) DEFAULT NULL,
  `RECHARGE_PERIOD_NUM` int(10) DEFAULT NULL,
  `RECHARGE_YEAR` int(4) DEFAULT NULL,
  `RECHARGE_MONTH` tinyint(2) DEFAULT NULL,
  `AMOUNT` decimal (16,2) NOT NULL DEFAULT '0.00',
  `REAL_NAME` varchar(255) DEFAULT NULL,
  `OPEN_BANK` varchar(32) DEFAULT NULL,
  `BANK_ADDRESS` varchar(255) DEFAULT NULL,
  `BANK_NO` varchar(32) DEFAULT NULL,
  `BANK_PROVINCE` int(6) DEFAULT NULL,
  `BANK_CITY` int(6) DEFAULT NULL,
  `BANK_COUNTY` int(6) DEFAULT NULL,
  `P_MONTH` date NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `BANK_PROVE` varchar(255) DEFAULT NULL,
  `REMARK` text,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `SN` (`SN`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='充值申请';

-- ----------------------------
-- Table structure for AR_REGION
-- ----------------------------
DROP TABLE IF EXISTS `AR_REGION`;
CREATE TABLE `AR_REGION` (
  `ID` varchar(32) NOT NULL,
  `REGION_CODE` int(6) NOT NULL DEFAULT '0',
  `DEEP` tinyint(2) NOT NULL DEFAULT '0',
  `REGION_NAME` varchar(128) NOT NULL DEFAULT '',
  `PID` int(6) NOT NULL DEFAULT '0',
  `AREA_CODE` varchar(6) NOT NULL DEFAULT '',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATER` varchar(16) DEFAULT '',
  `ADM_NAME` varchar(16) NOT NULL DEFAULT '',
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `REGION_CODE` (`REGION_CODE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地区';

-- ----------------------------
-- Table structure for AR_REG_INFO_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_REG_INFO_AUDIT`;
CREATE TABLE `AR_REG_INFO_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `REG_TYPE` varchar(32) NOT NULL,
  `REG_NAME` varchar(255) NOT NULL,
  `CREDIT_CODE` varchar(255) NOT NULL,
  `PREMISES` varchar(255) DEFAULT NULL,
  `LEGAL_PERSON` varchar(255) DEFAULT NULL,
  `REG_EXPIRES` int(10) NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATE_PERIOD` int(10) NOT NULL DEFAULT '0',
  `AUDIT_PERIOD` int(10) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `REG_TYPE` (`REG_TYPE`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员注册信息审核表';

-- ----------------------------
-- Table structure for AR_REG_TYPE
-- ----------------------------
DROP TABLE IF EXISTS `AR_REG_TYPE`;
CREATE TABLE `AR_REG_TYPE` (
  `ID` varchar(32) NOT NULL,
  `TYPE_NAME` varchar(48) NOT NULL,
  `IS_PACT` tinyint(1) NOT NULL DEFAULT '1',
  `MONTH_LIMIT_AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `YEAR_LIMIT_AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `SORT` int(10) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) DEFAULT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `REMARK` varchar(255) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `TYPE_NAME` (`TYPE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='聘级';

-- ----------------------------
-- Records of AR_REG_TYPE
-- ----------------------------
BEGIN;
INSERT INTO `AR_REG_TYPE` VALUES ('28359A005A3E44C6816A4A7E994B7789', '个体工商户', 1, 0.00, 0.00, 2, NULL, NULL, NULL, 1521438677, 0);
INSERT INTO `AR_REG_TYPE` VALUES ('56D9181C0F5D428FA2DBD4CAB263BF2F', '个人', 1, 0.00, 0.00, 1, NULL, NULL, NULL, 1521438677, 0);
INSERT INTO `AR_REG_TYPE` VALUES ('758BF69C25C3422AA7743936BC77EE64', '公司', 1, 0.00, 0.00, 3, NULL, NULL, NULL, 1521438677, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_RESEND_QY
-- ----------------------------
DROP TABLE IF EXISTS `AR_RESEND_QY`;
CREATE TABLE `AR_RESEND_QY` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `LAST_EMP_LV` varchar(32) DEFAULT '',
  `LAST_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_SUB_COM_ID` varchar(32) DEFAULT '',
  `LAST_PROVINCE` int(6) DEFAULT '0',
  `LAST_CITY` int(6) DEFAULT '0',
  `LAST_COUNTY` int(6) DEFAULT '0',
  `LAST_SYSTEM_ID` varchar(32) NOT NULL,
  `BONUS_QY` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SHOULD_QY` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_1L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_2L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_3L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_4L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_5L` decimal(16,3) NOT NULL DEFAULT '0.000',
  `QY_LS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `SURPLUS_LS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_YEAR` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `RESEND_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `RESEND_AUDIT_ID` varchar(32) DEFAULT NULL,
  `RESEND_AUDIT_STATUS` tinyint(1) DEFAULT '0',
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='总奖金结算记录';

-- ----------------------------
-- Table structure for AR_RESEND_QY_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_RESEND_QY_AUDIT`;
CREATE TABLE `AR_RESEND_QY_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `RESEND_ID` varchar(32) NOT NULL,
  `SHOULD_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `RESEND_BONUS` decimal(16,3) NOT NULL DEFAULT '0.000',
  `PERIOD_NUM` int(10) NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `RESEND_ADMIN_ID` varchar(32) NOT NULL,
  `AUDIT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `RESEND_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='补发区域津贴审核表';

-- ----------------------------
-- Table structure for AR_SHOP_GOODS
-- ----------------------------
DROP TABLE IF EXISTS `AR_SHOP_GOODS`;
CREATE TABLE `AR_SHOP_GOODS` (
  `ID` varchar(32) NOT NULL,
  `GOODS_NAME` varchar(255) NOT NULL,
  `CATE_ID` varchar(32) NOT NULL,
  `TYPE` tinyint(2) NOT NULL DEFAULT '1',
  `GOODS_NO` varchar(32) NOT NULL,
  `UNIT` varchar(16) NOT NULL,
  `COVER` varchar(255) NOT NULL,
  `IMAGES` text NOT NULL,
  `CONTENT` text NOT NULL,
  `SELL_PRICE` float(16,2) NOT NULL DEFAULT '0.00',
  `MARKET_PRICE` float(16,2) NOT NULL DEFAULT '0.00',
  `PRICE_PV` float(16,2) NOT NULL DEFAULT '0.00',
  `STORE_NUMS` int(10) NOT NULL DEFAULT '0',
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `SORT` int(10) NOT NULL DEFAULT '0',
  `IS_DEL` int(10) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `POINT` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `SELL_TYPE` VARCHAR(32) NOT NULL DEFAULT '1,2',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品';

-- ----------------------------
-- Table structure for AR_SMS_API
-- ----------------------------
DROP TABLE IF EXISTS `AR_SMS_API`;
CREATE TABLE `AR_SMS_API` (
  `ID` varchar(32) NOT NULL,
  `API_NAME` varchar(48) NOT NULL,
  `DESCRIPTION` varchar(255) NOT NULL,
  `CONFIG` text,
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `API_NAME` (`API_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='SMS短信接口表';

-- ----------------------------
-- Table structure for AR_SMS_TEMPLATE
-- ----------------------------
DROP TABLE IF EXISTS `AR_SMS_TEMPLATE`;
CREATE TABLE `AR_SMS_TEMPLATE` (
  `ID` varchar(32) NOT NULL,
  `TITLE` varchar(32) NOT NULL,
  `DESCRIPTION` varchar(255) NOT NULL,
  `FIELD` varchar(255) NOT NULL,
  `DEC_LEVEL` varchar(32) DEFAULT NULL,
  `EMP_LEVEL` varchar(32) DEFAULT NULL,
  `CONTENT` varchar(255) NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='短信模板';

-- ----------------------------
-- Records of AR_SMS_TEMPLATE
-- ----------------------------
BEGIN;
INSERT INTO `AR_SMS_TEMPLATE` VALUES ('651074FEE2804DE695CDB00EDED342B0', '注册成功', '首购报单完成后给新注册的会员发送注册成功短信', 'REG_SUCCESS', '67ABCB8C1F7D5519E055736AECE8644D', NULL, '尊敬的{REAL_NAME}，您已注册成功，用户名：{USER_NAME}，报单金额{AMOUNT}', 1526002387);
INSERT INTO `AR_SMS_TEMPLATE` VALUES ('A8563B1832CB4B1B95145974B60574C5', '注册成功', '首购报单完成后给新注册的会员发送注册成功短信', 'REG_SUCCESS', '67AB99FDC4B6501CE055736AECE8644D', NULL, '尊敬的{REAL_NAME}，您已注册成功，用户名：{USER_NAME}，报单金额{AMOUNT}', 1526002387);
INSERT INTO `AR_SMS_TEMPLATE` VALUES ('F8A46347B7014701B61B77034A7AE3BA', '注册成功', '首购报单完成后给新注册的会员发送注册成功短信', 'REG_SUCCESS', '67ABCCE20A9F5553E055736AECE8644D', NULL, '尊敬的{REAL_NAME}，您已注册成功，用户名：{USER_NAME}，报单金额{AMOUNT}', 1526002387);
INSERT INTO `AR_SMS_TEMPLATE` VALUES ('FEA004EDB52347D99869B2E8B61C7C3D', '注册成功', '首购报单完成后给新注册的会员发送注册成功短信', 'REG_SUCCESS', '67ABCE0ECE705575E055736AECE8644D', NULL, '尊敬的{REAL_NAME}，您已注册成功，用户名：{USER_NAME}，报单金额{AMOUNT}', 1526002387);
COMMIT;

-- ----------------------------
-- Table structure for AR_TASK_QUEUE
-- ----------------------------
DROP TABLE IF EXISTS `AR_TASK_QUEUE`;
CREATE TABLE `AR_TASK_QUEUE` (
  `ID` varchar(32) NOT NULL,
  `MAIN_ID` varchar(32) NOT NULL,
  `TYPE` int(10) NOT NULL DEFAULT '1',
  `CONTENT` varchar(255) NOT NULL,
  `PARAMS` text NOT NULL,
  `TOTAL_LOOP` int(10) NOT NULL DEFAULT '0',
  `DONE_TIMES` int(10) NOT NULL DEFAULT '0',
  `LOOP_TYPE` int(10) NOT NULL DEFAULT '0',
  `LOOP_CYCLE_CONTENT` varchar(255) DEFAULT NULL,
  `NEXT_AT` int(10) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `STARTED_AT` int(10) NOT NULL DEFAULT '0',
  `FINISHED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='任务队列列表';

-- ----------------------------
-- Records of AR_TASK_QUEUE
-- ----------------------------
BEGIN;
INSERT INTO `AR_TASK_QUEUE` VALUES ('c0f751ec57bb11ea95b9e8612aaeea8d', '1', 1, 'common\\libs\\taskQueue\\TaskFunc::autoBakBonusTable', '[]', 0, 1, 3, '6,3:00', 1583521200, 1582627449, 1582916400, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_TMP_OLD_NETWORK
-- ----------------------------
DROP TABLE IF EXISTS `AR_TMP_OLD_NETWORK`;
CREATE TABLE `AR_TMP_OLD_NETWORK` (
  `ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `REAL_NAME` varchar(128) NOT NULL,
  `PARENT_USER_NAME` varchar(16) NOT NULL,
  `PARENT_REAL_NAME` varchar(128) NOT NULL,
  `NET_USER_NAME` varchar(16) NOT NULL,
  `NET_REAL_NAME` varchar(128) NOT NULL,
  `SORT` int(10) unsigned NOT NULL DEFAULT '0',
  `NET_DEEP` int(10) unsigned NOT NULL DEFAULT '0',
  `REC_DEEP` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`) USING BTREE,
  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
  KEY `SORT` (`SORT`) USING BTREE,
  KEY `NET_DEEP` (`NET_DEEP`) USING BTREE,
  KEY `REC_DEEP` (`REC_DEEP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='老系统会员关系临时表';

-- ----------------------------
-- Table structure for AR_TMP_OLD_USER
-- ----------------------------
DROP TABLE IF EXISTS `AR_TMP_OLD_USER`;
CREATE TABLE `AR_TMP_OLD_USER` (
  `ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `REAL_NAME` varchar(128) NOT NULL,
  `REC_USER_NAME` varchar(16) NOT NULL,
  `REC_REAL_NAME` varchar(128) NOT NULL,
  `NET_USER_NAME` varchar(16) NOT NULL,
  `NET_REAL_NAME` varchar(128) NOT NULL,
  `SORT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_NAME` (`USER_NAME`) USING BTREE,
  KEY `REC_USER_NAME` (`REC_USER_NAME`) USING BTREE,
  KEY `NET_USER_NAME` (`NET_USER_NAME`) USING BTREE,
  KEY `SORT` (`SORT`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='老系统会员关系临时表';

-- ----------------------------
-- Table structure for AR_TRANSFER
-- ----------------------------
DROP TABLE IF EXISTS `AR_TRANSFER`;
CREATE TABLE `AR_TRANSFER` (
  `ID` varchar(32) NOT NULL,
  `TRANSFER_SN` varchar(32) NOT NULL,
  `OUT_UID` varchar(32) NOT NULL,
  `LAST_OUT_USER_NAME` varchar(16) NOT NULL,
  `LAST_OUT_REAL_NAME` varchar(128) NOT NULL,
  `LAST_OUT_DEC_LV` varchar(32) DEFAULT '',
  `LAST_OUT_DEC_ROLE_ID` varchar(32) DEFAULT '',
  `OUT_WALLET` varchar(128) NOT NULL DEFAULT 'bonus',
  `LAST_OUT_SYSTEM_ID` varchar(32) NOT NULL,
  `IN_UID` varchar(32) NOT NULL,
  `LAST_IN_USER_NAME` varchar(16) NOT NULL,
  `LAST_IN_REAL_NAME` varchar(128) NOT NULL,
  `LAST_IN_DEC_LV` varchar(32) DEFAULT '',
  `IN_WALLET` varchar(128) NOT NULL DEFAULT 'bonus',
  `LAST_IN_SYSTEM_ID` varchar(32) NOT NULL,
  `ORI_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `FEE` decimal(16,3) NOT NULL DEFAULT '0.000',
  `AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `REMARK` text,
  `PERIOD_NUM` int(10) NOT NULL,
  `CALC_MONTH` int(10) NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='转账记录';

-- ----------------------------
-- Table structure for AR_UPLOADS
-- ----------------------------
DROP TABLE IF EXISTS `AR_UPLOADS`;
CREATE TABLE `AR_UPLOADS` (
  `ID` varchar(32) NOT NULL,
  `FILE_NAME` varchar(255) NOT NULL,
  `CATEGORY` varchar(255) NOT NULL,
  `REMARK` varchar(255) DEFAULT NULL,
  `URL` varchar(1000) NOT NULL,
  `FILE_SIZE` varchar(255) DEFAULT NULL,
  `MD5` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `CATEGORY` (`CATEGORY`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='上传文件表';

-- ----------------------------
-- Table structure for AR_USER
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER`;
CREATE TABLE `AR_USER` (
  `ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `PASSWORD_HASH` varchar(255) NOT NULL,
  `PAY_PASSWORD` varchar(255) NOT NULL,
  `NATION` tinyint(2) NOT NULL DEFAULT '0',
  `REAL_NAME` varchar(128) NOT NULL,
  `ID_CARD` varchar(18) NOT NULL,
  `ID_TYPE` tinyint(1) NOT NULL DEFAULT '0',
  `MOBILE` varchar(11) DEFAULT '',
  `ADDRESS` varchar(2000) DEFAULT '',
  `ID_IMAGE` varchar(255) DEFAULT '',
  `OPEN_BANK` varchar(32) DEFAULT '',
  `BANK_ADDRESS` varchar(255) DEFAULT '',
  `BANK_NO` varchar(32) DEFAULT '',
  `BANK_PROVINCE` int(6) DEFAULT '0',
  `BANK_CITY` int(6) DEFAULT '0',
  `BANK_COUNTY` int(6) DEFAULT '0',
  `SPOUSE_NAME` varchar(16) DEFAULT '',
  `SPOUSE_IDCARD` varchar(18) DEFAULT '',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  `DEC_CLOSED` tinyint(1) NOT NULL DEFAULT '0',
  `DEC_CLOSED_AT` int(10) NOT NULL DEFAULT '0',
  `DEC_LV` varchar(32) DEFAULT '',
  `EMP_LV` varchar(32) DEFAULT '',
  `PROVINCE` int(6) NOT NULL DEFAULT '0',
  `CITY` int(6) NOT NULL DEFAULT '0',
  `COUNTY` int(6) NOT NULL DEFAULT '0',
  `TEL` varchar(16) DEFAULT '',
  `LOGIN_TIMES` int(10) NOT NULL DEFAULT '0',
  `LOGIN_IP` varchar(15) DEFAULT '',
  `LOGIN_AT` int(10) NOT NULL DEFAULT '0',
  `PULL_MESSAGE_AT` int(10) NOT NULL DEFAULT '0',
  `SUB_COM_ID` varchar(32) DEFAULT '',
  `AVATAR` varchar(255) NOT NULL,
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `ALLOW_TRANSFER` tinyint(1) NOT NULL DEFAULT '1',
  `TRANSFER_PROP` float(10,2) NOT NULL DEFAULT '0.00',
  `PARTITION_DATE` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `IS_DEC` tinyint(1) NOT NULL DEFAULT '0',
  `DEC_ID` varchar(32) NOT NULL DEFAULT '1',
  `BIRTHDAY` date DEFAULT '1990-09-09',
  `DEC_ROLE_ID` varchar(32) DEFAULT '',
  `PERIOD_AT` int(10) NOT NULL DEFAULT '0',
  `DEC_PROVINCE` int(6) NOT NULL DEFAULT '0',
  `DEC_CITY` int(6) NOT NULL DEFAULT '0',
  `DEC_COUNTY` int(6) NOT NULL DEFAULT '0',
  `IS_UNION` tinyint(1) NOT NULL DEFAULT '0',
  `STATUS_AT` int(10) NOT NULL DEFAULT '0',
  `VERIFIED` tinyint(1) NOT NULL DEFAULT '0',
  `VERIFIED_AT` int(10) NOT NULL DEFAULT '0',
  `ALLOW_LOGIN` tinyint(1) NOT NULL DEFAULT '1',
  `NOT_OPERATING` tinyint(1) NOT NULL DEFAULT '0',
  `REG_FROM` tinyint(1) NOT NULL DEFAULT '1',
  `ID_CARD_PREFIX` varchar(32) DEFAULT '',
  `ALLOW_BONUS_LOGIN` tinyint(1) NOT NULL DEFAULT '1',
  `SEX` varchar(32) DEFAULT '',
  `DEC_ACCOUNT_OLD` varchar(64) DEFAULT '',
  `BANK_UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `IS_DIRECT_SELLER` tinyint(1) NOT NULL DEFAULT '0',
  `DEC_LV_UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `DEC_LV_UPDATED_PERIOD` int(10) NOT NULL DEFAULT '0',
  `DEC_ADDRESS` varchar(2000) DEFAULT '',
  `DEC_PHONE` varchar(32) DEFAULT '',
  `GUARANTOR` varchar(32) DEFAULT '',
  `GUARANTOR_NAME` varchar(64) DEFAULT '',
  `PART_FUNC_CLOSED` tinyint(1) NOT NULL DEFAULT '0',
  `LAST_DEC_LV_UPDATED_PERIOD` int(10) NOT NULL DEFAULT '0',
  `USER_CREATOR` varchar(32) DEFAULT '',
  `USER_UPDATER` varchar(32) DEFAULT '',
  `LAST_DEC_LV_UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `DEC_CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `PART_FUNC_CLOSED_REMARK` text,
  `DEC_CREATED_PERIOD` int(10) NOT NULL DEFAULT '0',
  `PASSWORD_CHANGED` tinyint(1) NOT NULL DEFAULT '0',
  `SUB_COM_LEADER` tinyint(1) NOT NULL DEFAULT '0',
  `LOGIN_FAIL_TIMES` int(10) NOT NULL DEFAULT '0',
  `ZG_UPGRADE_PV` decimal(16,2) NOT NULL DEFAULT '0.00',
  `APP_CLIENT_ID` varchar(128) DEFAULT '',
  `READ_AGREEMENT` tinyint(1) NOT NULL DEFAULT '1',
  `LAST_DEC_LV` varchar(32) DEFAULT '',
  `BONUS_APP_CLIENT_ID` varchar(128) DEFAULT '',
  `IS_FIRST_OPEN` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `USER_NAME` (`USER_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户';

-- ----------------------------
-- Records of AR_USER
-- ----------------------------
BEGIN;
INSERT INTO `AR_USER` VALUES ('670B84FD7C216D4EE055736AECE8644D', 'Q94839185', '$2y$10$26RZqjbcKbKmeLn5JZtqYON2CBCiGT76TX2cxyjT10eNjZ7CZBfTW', '$2y$10$P1m//xxOA1JP4aJ.7ZfqVe8de8Of1XJDnGBn3OfPVB.vUGcJX4OxS', 1, '齐文瑀', '32038119770810152X', 0, '13333333333', '秦皇岛市东山街1000001号', 'http://upload.ar.wqcms.com/files/2018/0606/e0013022694b11e8b1af10ddb1d0e3fd', '0010000', '鸽子窝110号', '6222222222222220131', 130000, 130300, 130304, '瞬瞬', '130324198808081235', 1528770496, 1575450033, 1, 0, 0, '67ABCE0ECE705575E055736AECE8644D', '67BE1C6C21F81B32E055736AECE8644D', 110000, 110100, 110101, '13826545212', 2659, '106.118.113.61', 1578879390, 0, '953BF18AE3694BC4E053693418ACAC98', 'http://upload.ar.wqcms.com/cdn/avatar/1.png', 0, 0, 1, 1.01, '2018-06-12', 1, '670B84FD7C216D4EE055736AECE8644D', '1977-08-10', '810916A06B304162902408A6B9E5D177', 117, 130000, 130200, 130203, 0, 1565921409, 1, 1571797394, 1, 0, 0, NULL, 1, '女', NULL, 0, 0, 1573003331, 158, '123', '15098156582', NULL, NULL, 0, 0, 'adminty', 'adminty', 0, 1572337842, '报单中心货款/会员货款余额15132.00,600010.00高于参数\"100.00\"关闭', 158, 3, 0, 5, 12000.00, NULL, 1, '67ABCE0ECE705575E055736AECE8644D', NULL, 1);
COMMIT;

-- ----------------------------
-- Table structure for AR_USER_BIND
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_BIND`;
CREATE TABLE `AR_USER_BIND` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `MAIN_UID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `IS_DEL` int(10) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) DEFAULT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_USER` varchar(32) DEFAULT NULL,
  `UPDATE_USER` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `MAIN_UID` (`MAIN_UID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='点位合作';

-- ----------------------------
-- Table structure for AR_USER_BONUS
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_BONUS`;
CREATE TABLE `AR_USER_BONUS` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `BONUS` decimal(16,2) NOT NULL DEFAULT '0.00',
  `BONUS_FREEZE` decimal(16,2) NOT NULL DEFAULT '0.00',
  `CF` decimal(16,2) NOT NULL DEFAULT '0.00',
  `LX` decimal(16,2) NOT NULL DEFAULT '0.00',
  `QY_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `YC_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `FX_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `LS_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `FW_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `BT_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `BT_PROD_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `BT_TOOL_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `CF_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `LX_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `DEDUCT_ZR_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `FL_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `VER` int(10) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `BD_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `TG_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `YJ_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `GX_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `GL_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `RECONSUME_POINTS` decimal(16,2) NOT NULL DEFAULT '0.00',
  `RECONSUME_POINTS_EXPIRED` decimal(16,2) NOT NULL DEFAULT '0.00',
  `RECONSUME_POINTS_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `MANAGE_TAX` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_QY_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_YC_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_BD_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_TG_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_YJ_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_GX_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `ORI_GL_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  `BONUS_TOTAL` decimal(16,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员奖金表';

-- ----------------------------
-- Table structure for AR_USER_CLOSE
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_CLOSE`;
CREATE TABLE `AR_USER_CLOSE` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `TYPE` tinyint(1) NOT NULL DEFAULT '1',
  `IS_MANUAL` tinyint(1) NOT NULL DEFAULT '0',
  `PERIOD_NUM` int(10) NOT NULL,
  `IS_CLOSE` tinyint(1) NOT NULL DEFAULT '1',
  `REMARK` varchar(255) NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ADMIN_ID` varchar(32) DEFAULT NULL,
  `AUDIT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `AUDITED_AT` int(10) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `TYPE` (`TYPE`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `IS_CLOSE` (`IS_CLOSE`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员关停和停发表';

-- ----------------------------
-- Table structure for AR_USER_INFO
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_INFO`;
CREATE TABLE `AR_USER_INFO` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `ZC_PV` decimal(16,3) NOT NULL DEFAULT '0.000',
  `ZC_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  `CON_UID` varchar(32) NOT NULL,
  `REC_UID` varchar(32) NOT NULL,
  `CON_NUM` int(10) NOT NULL DEFAULT '0',
  `REC_NUM` int(10) NOT NULL DEFAULT '0',
  `NETWORK_DEEP` int(10) NOT NULL DEFAULT '0',
  `RELATION_DEEP` int(10) NOT NULL DEFAULT '0',
  `SYSTEM_ID` varchar(32) DEFAULT NULL,
  `IS_GROUP_LEADER` tinyint(1) NOT NULL DEFAULT '0',
  `IS_SYSTEM_LEADER` tinyint(1) NOT NULL DEFAULT '0',
  `IS_TEAM` tinyint(1) NOT NULL DEFAULT '0',
  `IS_BIND` tinyint(1) NOT NULL DEFAULT '0',
  `IS_TEAM_MAIN` tinyint(1) NOT NULL DEFAULT '0',
  `IS_BIND_MAIN` tinyint(1) NOT NULL DEFAULT '0',
  `IS_AUTO_WITHDRAW` tinyint(1) NOT NULL DEFAULT '0',
  `CLOSE_LOGIN` tinyint(1) NOT NULL DEFAULT '0',
  `REG_TYPE` varchar(32) NOT NULL DEFAULT '56D9181C0F5D428FA2DBD4CAB263BF2F',
  `SHOULD_REG_TYPE` varchar(32) DEFAULT '56D9181C0F5D428FA2DBD4CAB263BF2F',
  `REG_NAME` varchar(255) DEFAULT NULL,
  `CREDIT_CODE` varchar(255) DEFAULT NULL,
  `PREMISES` varchar(255) DEFAULT NULL,
  `LEGAL_PERSON` varchar(255) DEFAULT NULL,
  `REG_EXPIRES` int(10) DEFAULT NULL,
  `STORE_TYPE` tinyint(1) NOT NULL DEFAULT '0',
  `INVOICE_BALANCE` decimal(16,2) NOT NULL DEFAULT '0.00',
  `HIGHEST_EMP_LV` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `CLOSE_LOGIN_AT` int(10) NOT NULL DEFAULT '0',
  `PULLED_AT` int(10) NOT NULL DEFAULT '0',
  `DELETED` tinyint(1) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  `GROUP_LEADER_AT` int(10) NOT NULL DEFAULT '0',
  `ALLOW_TRANSFER` tinyint(1) NOT NULL DEFAULT '1',
  `ALLOW_RECONSUME_SMS` tinyint(1) NOT NULL DEFAULT '0',
  `ALLOW_RECONSUME_SMS_TO` int(10) NOT NULL DEFAULT '0',
  `HIGHEST_EMP_LV_PERIOD` int(10) NOT NULL DEFAULT '1',
  `TRANSFER_PROP` float(10,2) NOT NULL DEFAULT '100.00',
  `LOGIN_NUMS` int(10) NOT NULL DEFAULT '0',
  `FAIL_NUMS` int(10) NOT NULL DEFAULT '0',
  `LAST_LOGIN_IP` varchar(16) NOT NULL DEFAULT '0.0.0.0',
  `LAST_LOGIN_AT` int(10) NOT NULL DEFAULT '0',
  `SHOW_EMP_LV` varchar(32) DEFAULT '',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `USER_NAME_DELETED` (`USER_NAME`,`DELETED`) USING BTREE,
  KEY `NETWORK_DEEP` (`NETWORK_DEEP`) USING BTREE,
  KEY `RELATION_DEEP` (`RELATION_DEEP`) USING BTREE,
  KEY `REG_TYPE` (`REG_TYPE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员资料表';

-- ----------------------------
-- Records of AR_USER_INFO
-- ----------------------------
BEGIN;
INSERT INTO `AR_USER_INFO`(`ID`, `USER_ID`, `USER_NAME`, `ZC_PV`, `ZC_AMOUNT`, `CON_UID`, `REC_UID`, `CON_NUM`, `REC_NUM`, `NETWORK_DEEP`, `RELATION_DEEP`, `SYSTEM_ID`, `IS_GROUP_LEADER`, `IS_SYSTEM_LEADER`, `IS_TEAM`, `IS_BIND`, `IS_TEAM_MAIN`, `IS_BIND_MAIN`, `IS_AUTO_WITHDRAW`, `CLOSE_LOGIN`, `REG_TYPE`, `SHOULD_REG_TYPE`, `REG_NAME`, `CREDIT_CODE`, `PREMISES`, `LEGAL_PERSON`, `REG_EXPIRES`, `STORE_TYPE`, `INVOICE_BALANCE`, `HIGHEST_EMP_LV`, `CREATED_AT`, `UPDATED_AT`, `CLOSE_LOGIN_AT`, `PULLED_AT`, `DELETED`, `DELETED_AT`, `GROUP_LEADER_AT`, `ALLOW_TRANSFER`, `ALLOW_RECONSUME_SMS`, `ALLOW_RECONSUME_SMS_TO`, `HIGHEST_EMP_LV_PERIOD`, `TRANSFER_PROP`, `LOGIN_NUMS`, `FAIL_NUMS`, `LAST_LOGIN_IP`, `LAST_LOGIN_AT`, `SHOW_EMP_LV`) VALUES ('74442999509159944', '670B84FD7C216D4EE055736AECE8644D', 'Q94839185', 2980.000, 2980.000, '0', '0', 11, 11, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 1, 0, '56D9181C0F5D428FA2DBD4CAB263BF2F', '56D9181C0F5D428FA2DBD4CAB263BF2F', NULL, NULL, NULL, NULL, NULL, 0, 0.00, NULL, 1520667339, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 100.00, 2, 3, '127.0.0.1', 1582625301, '');
COMMIT;

-- ----------------------------
-- Table structure for AR_USER_MOVE
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_MOVE`;
CREATE TABLE `AR_USER_MOVE` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `FROM_UID` varchar(32) NOT NULL,
  `TO_UID` varchar(32) NOT NULL,
  `LOCATION` tinyint(1) NOT NULL DEFAULT '0',
  `TYPE` varchar(48) NOT NULL,
  `IS_MOVING` tinyint(1) NOT NULL DEFAULT '0',
  `MOVE_PERCENT` int(3) NOT NULL DEFAULT '0',
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `PERIOD_NUM` int(10) NOT NULL,
  `UPDATE_PERIOD_NUM` int(10) DEFAULT NULL,
  `AUDIT_PERIOD_NUM` int(10) DEFAULT NULL,
  `MOVE_ADMIN_ID` varchar(32) NOT NULL,
  `AUDIT_ADMIN_ID` varchar(32) DEFAULT NULL,
  `NET_TABLE_NAME` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `STARTED_AT` int(10) NOT NULL DEFAULT '0',
  `ENDED_AT` int(10) NOT NULL DEFAULT '0',
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员移网记录';

-- ----------------------------
-- Table structure for AR_USER_NETWORK
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_NETWORK`;
CREATE TABLE `AR_USER_NETWORK` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `PARENT_UID` varchar(32) NOT NULL,
  `LOCATION` tinyint(1) NOT NULL,
  `TOP_UID` varchar(32) NOT NULL,
  `TOP_DEEP` int(10) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `PARENT_UID` (`PARENT_UID`) USING BTREE,
  KEY `LOCATION` (`LOCATION`) USING BTREE,
  KEY `TOP_DEEP` (`TOP_DEEP`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='安置关系表';

-- ----------------------------
-- Records of AR_USER_NETWORK
-- ----------------------------
BEGIN;
INSERT INTO `AR_USER_NETWORK` VALUES ('8F793577F2A44947A5918852976AE290', '670B84FD7C216D4EE055736AECE8644D', '0', 0, '670B84FD7C216D4EE055736AECE8644D', 0, 100, 1522378282, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_USER_PERF
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_PERF`;
CREATE TABLE `AR_USER_PERF` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `PV_PCS_ZC` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_PCS_YH` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_PCS_ZG` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_PCS_LS` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_PCS_FX` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_1L` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_2L` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_3L` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_4L` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PV_5L` decimal(16,2) NOT NULL DEFAULT '0.00',
  `CREATED_AT` int(10) NOT NULL,
  `PV_PSS` decimal(16,2) NOT NULL DEFAULT '0.00',
   PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员累计业绩表';

-- ----------------------------
-- Table structure for AR_USER_PERF_UPDATE
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_PERF_UPDATE`;
CREATE TABLE `AR_USER_PERF_UPDATE` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL DEFAULT '0',
  `P_CALC_MONTH` date NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员累计业绩更新期数';

-- ----------------------------
-- Table structure for AR_USER_RELATION
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_RELATION`;
CREATE TABLE `AR_USER_RELATION` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `PARENT_UID` varchar(32) NOT NULL,
  `TOP_UID` varchar(32) NOT NULL,
  `TOP_DEEP` int(10) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `PARENT_UID` (`PARENT_UID`) USING BTREE,
  KEY `TOP_DEEP` (`TOP_DEEP`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开拓关系表';

-- ----------------------------
-- Records of AR_USER_RELATION
-- ----------------------------
BEGIN;
INSERT INTO `AR_USER_RELATION` VALUES ('EF010C38C7144BD0844593A1FF8AC7AD', '670B84FD7C216D4EE055736AECE8644D', '0', '670B84FD7C216D4EE055736AECE8644D', 0, 100, 1522378282, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_USER_STATUS_AUDIT
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_STATUS_AUDIT`;
CREATE TABLE `AR_USER_STATUS_AUDIT` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `STATUS_VALUE` tinyint(1) NOT NULL DEFAULT '1',
  `ORI_VALUE` tinyint(1) NOT NULL DEFAULT '1',
  `PERIOD_NUM` int(10) NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `DEC_LV` varchar(32) DEFAULT NULL,
  `EMP_LV` varchar(32) DEFAULT NULL,
  `PV_1L` decimal(16,2) DEFAULT NULL,
  `PV_2L` decimal(16,2) DEFAULT NULL,
  `PV_3L` decimal(16,2) DEFAULT NULL,
  `PV_4L` decimal(16,2) DEFAULT NULL,
  `PV_5L` decimal(16,2) DEFAULT NULL,
  `SURPLUS_1L` decimal(16,2) DEFAULT NULL,
  `SURPLUS_2L` decimal(16,2) DEFAULT NULL,
  `SURPLUS_3L` decimal(16,2) DEFAULT NULL,
  `SURPLUS_4L` decimal(16,2) DEFAULT NULL,
  `SURPLUS_5L` decimal(16,2) DEFAULT NULL,
  `IS_PERIOD_ADD_T` tinyint(1) NOT NULL DEFAULT '0',
  `ADD_T_PERIOD_NUM` int(10) DEFAULT NULL,
  `IS_PERIOD_OPEN` tinyint(1) NOT NULL DEFAULT '0',
  `OPEN_PERIOD_NUM` int(10) DEFAULT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `AUDIT_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员状态审核表';

-- ----------------------------
-- Table structure for AR_USER_SYSTEM
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_SYSTEM`;
CREATE TABLE `AR_USER_SYSTEM` (
  `ID` varchar(32) NOT NULL,
  `SYSTEM_NAME` varchar(32) NOT NULL,
  `LEADER_UID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) NOT NULL,
  `UPDATE_PERIOD_NUM` int(10) DEFAULT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `UPDATE_REMARK` text,
  `IS_DEL` tinyint(1) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `SYSTEM_NAME` (`SYSTEM_NAME`) USING BTREE,
  UNIQUE KEY `LEADER_UID` (`LEADER_UID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员体系';

-- ----------------------------
-- Table structure for AR_USER_TEAMWORK
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_TEAMWORK`;
CREATE TABLE `AR_USER_TEAMWORK` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `MAIN_UID` varchar(32) NOT NULL,
  `DIVIDE_PERCENT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `PERIOD_NUM` int(10) NOT NULL,
  `IS_DEL` int(10) NOT NULL DEFAULT '0',
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `CREATE_REMARK` text,
  `UPDATE_REMARK` text,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATED_PERIOD` int(10) DEFAULT NULL,
  `DELETED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `MAIN_UID` (`MAIN_UID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='点位合作';

-- ----------------------------
-- Table structure for AR_USER_TOKEN
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_TOKEN`;
CREATE TABLE `AR_USER_TOKEN` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `USER_ID` varchar(32) NOT NULL COMMENT '会员ID',
  `PC_ACCESS_TOKEN` varchar(255) DEFAULT NULL COMMENT 'PC端TOKEN',
  `APP_ACCESS_TOKEN` varchar(255) DEFAULT NULL COMMENT 'APP端TOKEN',
  `PC_REFRESH_TOKEN` varchar(255) DEFAULT NULL COMMENT 'PC刷新TOKEN',
  `APP_REFRESH_TOKEN` varchar(255) DEFAULT NULL COMMENT 'APP刷新TOKEN',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `PAT_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'PC端TOKEN更新时间',
  `AAT_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'APP端TOKEN更新时间',
  `PRT_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'PC刷新TOKEN更新时间',
  `ART_UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT 'APP刷新TOKEN更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `PC_ACCESS_TOKEN` (`PC_ACCESS_TOKEN`),
  UNIQUE KEY `APP_ACCESS_TOKEN` (`APP_ACCESS_TOKEN`),
  UNIQUE KEY `PC_REFRESH_TOKEN` (`PC_REFRESH_TOKEN`),
  UNIQUE KEY `APP_REFRESH_TOKEN` (`APP_REFRESH_TOKEN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员TOKEN表';

-- ----------------------------
-- Records of AR_USER_TOKEN
-- ----------------------------
BEGIN;
INSERT INTO `AR_USER_TOKEN` VALUES ('bc9f07f257b611ea95b9e8612aaeea8d', '670B84FD7C216D4EE055736AECE8644D', '3382df1f58a0891be23b04ec69ba06ac', NULL, '7ebd9121caef145e30dff982af7a1f67', NULL, 1582625294, 1582625301, 0, 1582625301, 0);
COMMIT;

-- ----------------------------
-- Table structure for AR_USER_WALLET
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_WALLET`;
CREATE TABLE `AR_USER_WALLET` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `CASH` decimal(16,2) NOT NULL DEFAULT '0.00',
  `CLEAR_BY_CLOSED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  KEY `USER_ID` (`USER_ID`),
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='钱包';

-- ----------------------------
-- Table structure for AR_WITHDRAW
-- ----------------------------
DROP TABLE IF EXISTS `AR_WITHDRAW`;
CREATE TABLE `AR_WITHDRAW` (
  `ID` varchar(32) NOT NULL,
  `SN` varchar(32) DEFAULT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `ID_CARD` varchar(20) DEFAULT NULL,
  `WITHDRAW_PERIOD_NUM` int(10) DEFAULT NULL,
  `WITHDRAW_YEAR` int(4) DEFAULT NULL,
  `WITHDRAW_MONTH` tinyint(2) DEFAULT NULL,
  `PAY_TYPE` tinyint(1) NOT NULL DEFAULT '1',
  `IS_AUTO_WITHDRAW` tinyint(1) NOT NULL DEFAULT '0',
  `AMOUNT` decimal (16,2) NOT NULL DEFAULT '0.00',
  `INVOICE_ID` varchar(32) DEFAULT NULL,
  `REAL_NAME` varchar(255) DEFAULT NULL,
  `OPEN_BANK` varchar(32) DEFAULT NULL,
  `BANK_ADDRESS` varchar(255) DEFAULT NULL,
  `BANK_NO` varchar(32) DEFAULT NULL,
  `BANK_PROVINCE` int(6) DEFAULT NULL,
  `BANK_CITY` int(6) DEFAULT NULL,
  `BANK_COUNTY` int(6) DEFAULT NULL,
  `P_MONTH` date NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `REMARK` text,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `UPDATE_REMARK` text,
  `AUDIT_ADMIN` varchar(32) DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  `PLAN_PAID_AT` int(10) NOT NULL,
  `PAID_AT` int(10) NOT NULL DEFAULT '0',
  `PAID_FAIL_REMARK` text,
  `PAID_FAIL_AT` int(10) NOT NULL DEFAULT '0',
  `BACK_REMARK` text,
  `BACK_FAIL_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `SN` (`SN`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='提现申请';

-- ----------------------------
-- Table structure for AR_WITHDRAW_LEVEL
-- ----------------------------
DROP TABLE IF EXISTS `AR_WITHDRAW_LEVEL`;
CREATE TABLE `AR_WITHDRAW_LEVEL` (
  `ID` varchar(32) NOT NULL,
  `TYPE` varchar(32) NOT NULL,
  `MIN_AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `MAX_AMOUNT` decimal(16,2) DEFAULT NULL,
  `TAX_PERCENT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='提现金额等级';

-- ----------------------------
-- Records of AR_WITHDRAW_LEVEL
-- ----------------------------
BEGIN;
INSERT INTO `AR_WITHDRAW_LEVEL` VALUES ('7671AA8CA8DE4BF39C00BB5558416EAB', '56D9181C0F5D428FA2DBD4CAB263BF2F', 2001.00, 5000.00, 2.00, 1523435514);
INSERT INTO `AR_WITHDRAW_LEVEL` VALUES ('89CFFF1D53464165B173ED9B48AEC0C3', '56D9181C0F5D428FA2DBD4CAB263BF2F', 5001.00, NULL, 1.00, 1523437783);
INSERT INTO `AR_WITHDRAW_LEVEL` VALUES ('BE062D2EDA204B16B31DF8B06189AD07', '56D9181C0F5D428FA2DBD4CAB263BF2F', 0.00, 2000.00, 5.00, 1523435526);
COMMIT;

-- ----------------------------
-- Table structure for AR_YEAR_HIGHEST_EMP_LV
-- ----------------------------
DROP TABLE IF EXISTS `AR_YEAR_HIGHEST_EMP_LV`;
CREATE TABLE `AR_YEAR_HIGHEST_EMP_LV` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `YEAR` int(4) NOT NULL DEFAULT '0',
  `HIGHEST_EMP_LV` varchar(32) NOT NULL,
  `HIGHEST_EMP_LV_SORT` int(10) NOT NULL DEFAULT '0',
  `HIGHEST_EMP_LV_PERIOD` int(10) NOT NULL DEFAULT '0',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  `PARTITION_DATE` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `YEAR` (`YEAR`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员年度最高聘级';

-- ----------------------------
-- Table structure for AR_USER_PERIOD_POINTS
-- ----------------------------
DROP TABLE IF EXISTS `AR_USER_PERIOD_POINTS`;
CREATE TABLE `AR_USER_PERIOD_POINTS` (
  `ID` varchar(32) NOT NULL COMMENT 'ID',
  `USER_ID` varchar(32) NOT NULL,
  `PERIOD_NUM` int(10) unsigned NOT NULL DEFAULT '0',
  `RECONSUME_POINTS` decimal(16,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '复消积分',
  `REMAINDER_POINTS` decimal(16,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '剩余积分',
  `EXPIRED` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否过期,1已过期，0未过期',
  `EXPIRED_PERIOD` int(10) NOT NULL DEFAULT '0' COMMENT '过期期数',
  `EXPIRED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '过期时间',
  `CREATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`) USING BTREE,
  KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
  KEY `EXPIRED` (`EXPIRED`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户期数复消积分记录表';

SET FOREIGN_KEY_CHECKS = 1;
