-- MySQL dump 10.13  Distrib 5.7.22, for Linux (x86_64)
--
-- Host: 127.0.0.1    Database: aikang_db
-- ------------------------------------------------------
-- Server version	5.7.25-TiDB-v4.0.0-beta-232-g902c6ca2b

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `AR_AD`
--

DROP TABLE IF EXISTS `AR_AD`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='广告';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ADMIN`
--

DROP TABLE IF EXISTS `AR_ADMIN`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL 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 COLLATE=utf8mb4_bin COMMENT='管理员表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ADMIN_ROLE`
--

DROP TABLE IF EXISTS `AR_ADMIN_ROLE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL COMMENT '权限',
  `COLUMN_PERMISSION` text DEFAULT NULL 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 COLLATE=utf8mb4_bin COMMENT='管理员角色表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ADMIN_TOKEN`
--

DROP TABLE IF EXISTS `AR_ADMIN_TOKEN`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='管理员TOKEN表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_AD_LOCATION`
--

DROP TABLE IF EXISTS `AR_AD_LOCATION`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='广告位';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ARTICLE`
--

DROP TABLE IF EXISTS `AR_ARTICLE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_ARTICLE` (
  `ID` varchar(32) NOT NULL,
  `TITLE` varchar(255) NOT NULL,
  `CID` varchar(32) NOT NULL,
  `CONTENT` text DEFAULT NULL,
  `STATUS` tinyint(1) NOT NULL DEFAULT '1',
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `TITLE` (`TITLE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='文章表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ARTICLE_CATEGORY`
--

DROP TABLE IF EXISTS `AR_ARTICLE_CATEGORY`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='文章分类表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_BALANCE_AUDIT`
--

DROP TABLE IF EXISTS `AR_BALANCE_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `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`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='钱包变更审核记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_BILL`
--

DROP TABLE IF EXISTS `AR_BILL`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='会员提供的税票';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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(9) 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_REAL` decimal(16,3) unsigned NOT NULL DEFAULT '0.000' COMMENT '实际奖金',
  `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`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `USER_ID` (`USER_ID`),
  KEY `CALC_MONTH` (`CALC_MONTH`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='总奖金结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_BD`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_BD`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `FROM_USER_ID` (`FROM_USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='报单奖结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_BT`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_BT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='报单中心店补补贴记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_CF`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_CF`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='车房养老结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_FL`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_FL`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='货补记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_FW`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_FW`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='区级店业绩提成结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_FX`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_FX`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='复销奖结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_GL`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_GL`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `FROM_USER_ID` (`FROM_USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='管理奖结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_GX`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_GX`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `FROM_USER_ID` (`FROM_USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='共享奖结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_LS`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_LS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='零售结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_LX`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_LX`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='领袖分红结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_QY`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_QY`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='区域津贴结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_TG`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_TG`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `FROM_USER_ID` (`FROM_USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='推广奖结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_YC`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_YC`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `FROM_USER_ID` (`FROM_USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='育成津贴结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CALC_BONUS_YJ`
--

DROP TABLE IF EXISTS `AR_CALC_BONUS_YJ`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `FROM_USER_ID` (`FROM_USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='业绩奖结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CF_LX_AUDIT`
--

DROP TABLE IF EXISTS `AR_CF_LX_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `YEAR` (`YEAR`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='车房领袖年度发放审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_COMPANY_BANK`
--

DROP TABLE IF EXISTS `AR_COMPANY_BANK`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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(9) NOT NULL,
  `CREATE_ADMIN` varchar(32) NOT NULL,
  `UPDATE_ADMIN` varchar(32) DEFAULT NULL,
  `REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='公司银行信息';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_CONFIG`
--

DROP TABLE IF EXISTS `AR_CONFIG`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL 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 COLLATE=utf8mb4_bin COMMENT='系统配置表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_DEAL_TYPE`
--

DROP TABLE IF EXISTS `AR_DEAL_TYPE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `UPDATE_REMARK` text DEFAULT NULL,
  `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 COLLATE=utf8mb4_bin COMMENT='交易类型表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_DECLARATION_LEVEL`
--

DROP TABLE IF EXISTS `AR_DECLARATION_LEVEL`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 NOT NULL DEFAULT '0' COMMENT '更新期数',
  `ORDER_PERMISSION` text DEFAULT NULL 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='报单级别';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_DECLARATION_PACKAGE`
--

DROP TABLE IF EXISTS `AR_DECLARATION_PACKAGE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_DECLARATION_PACKAGE` (
  `ID` varchar(32) NOT NULL,
  `PACKAGE_NAME` varchar(48) NOT NULL,
  `PACKAGE_NO` varchar(32) NOT NULL DEFAULT 'PG546763',
  `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 DEFAULT NULL,
  `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',
  `IS_DEL` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  `DELETED_AT` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  `STATUS` tinyint(2) unsigned NOT NULL DEFAULT '1' COMMENT '上下架',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `PACKAGE_NAME` (`PACKAGE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='报单套餐';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_DEC_LEVEL_LOG`
--

DROP TABLE IF EXISTS `AR_DEC_LEVEL_LOG`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `STATUS` (`STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='报单级别变动记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_DEC_ORDER`
--

DROP TABLE IF EXISTS `AR_DEC_ORDER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `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`),
  KEY `USER_ID` (`USER_ID`),
  KEY `TYPE` (`TYPE`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `IS_DEL` (`IS_DEL`),
  KEY `ORDER_SN` (`ORDER_SN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='报单';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_DEC_ROLE`
--

DROP TABLE IF EXISTS `AR_DEC_ROLE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_DEC_ROLE` (
  `ID` varchar(32) NOT NULL,
  `ROLE_NAME` varchar(255) NOT NULL COMMENT '名称',
  `FW_BONUS_PERCENT` decimal(16,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '推荐奖比例',
  `SORT` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL COMMENT '更新时间',
  `UPDATER` varchar(16) DEFAULT NULL COMMENT '更新人',
  `ADM_NAME` varchar(16) NOT NULL COMMENT '创建人',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ROLE_NAME` (`ROLE_NAME`),
  KEY `SORT` (`SORT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EMPLOY_LEVEL`
--

DROP TABLE IF EXISTS `AR_EMPLOY_LEVEL`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='聘级';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EMPLOY_LEVEL_LOG`
--

DROP TABLE IF EXISTS `AR_EMPLOY_LEVEL_LOG`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='聘级变动记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXCEL_ADD_USER`
--

DROP TABLE IF EXISTS `AR_EXCEL_ADD_USER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='空单录入待导入表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXCEL_CHANGE_BALANCE`
--

DROP TABLE IF EXISTS `AR_EXCEL_CHANGE_BALANCE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='调整会员余额待导入表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXCEL_IMPORT`
--

DROP TABLE IF EXISTS `AR_EXCEL_IMPORT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='Excel导入记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXCEL_REG_INFO`
--

DROP TABLE IF EXISTS `AR_EXCEL_REG_INFO`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `SORT` int(10) NOT NULL,
  `STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `ERROR_REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='注册信息待导入表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXCEL_WITHDRAW_PAID_FALSE`
--

DROP TABLE IF EXISTS `AR_EXCEL_WITHDRAW_PAID_FALSE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `USER_NAME` (`USER_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='提现标记失败待导入表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXPORT`
--

DROP TABLE IF EXISTS `AR_EXPORT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `MODULE_NAME` (`MODULE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='导出表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_EXPORT_FILE`
--

DROP TABLE IF EXISTS `AR_EXPORT_FILE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='导出文件表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_FLOW_BONUS`
--

DROP TABLE IF EXISTS `AR_FLOW_BONUS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='总奖金流水';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_FLOW_CF`
--

DROP TABLE IF EXISTS `AR_FLOW_CF`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='车房养老奖流水';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_FLOW_DEDUCT_ZR`
--

DROP TABLE IF EXISTS `AR_FLOW_DEDUCT_ZR`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='责任业绩扣除记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_FLOW_LX`
--

DROP TABLE IF EXISTS `AR_FLOW_LX`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='领袖分红奖流水';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_FLOW_RECONSUME_POINTS`
--

DROP TABLE IF EXISTS `AR_FLOW_RECONSUME_POINTS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='重消积分流水';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_FLOW_WALLET`
--

DROP TABLE IF EXISTS `AR_FLOW_WALLET`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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',
  `TRANSFER_SN` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='现金钱包流水';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_HISTORY_BONUS`
--

DROP TABLE IF EXISTS `AR_HISTORY_BONUS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='历史奖金余额';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_INVOICE_AUDIT`
--

DROP TABLE IF EXISTS `AR_INVOICE_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `INVOICE_NUM` (`INVOICE_NUM`),
  KEY `USER_ID` (`USER_ID`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='发票审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_INVOICE_BALANCE_AUDIT`
--

DROP TABLE IF EXISTS `AR_INVOICE_BALANCE_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='发票余额审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_INVOICE_FLOW`
--

DROP TABLE IF EXISTS `AR_INVOICE_FLOW`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `CREATE_TIME` int(10) NOT NULL,
  `AUDIT_ADMIN` varchar(32) NOT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `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 COLLATE=utf8mb4_bin COMMENT='发票交易记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_MESSAGE`
--

DROP TABLE IF EXISTS `AR_MESSAGE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `IS_READ` (`IS_READ`),
  KEY `IS_DEL` (`IS_DEL`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='站内信';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_MESSAGE_TEXT`
--

DROP TABLE IF EXISTS `AR_MESSAGE_TEXT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='站内信内容';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_OCR_API`
--

DROP TABLE IF EXISTS `AR_OCR_API`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_OCR_API` (
  `ID` varchar(32) NOT NULL,
  `API_NAME` varchar(48) NOT NULL,
  `DESCRIPTION` varchar(255) NOT NULL,
  `CONFIG` text DEFAULT NULL,
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='OCR识别接口表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_OPEN_BANK`
--

DROP TABLE IF EXISTS `AR_OPEN_BANK`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开户行';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ORDER`
--

DROP TABLE IF EXISTS `AR_ORDER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `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(9) 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',
  `WAREHOUSE` varchar(16) NOT NULL DEFAULT '01',
  PRIMARY KEY (`ID`),
  KEY `SN` (`SN`),
  KEY `USER_ID` (`USER_ID`),
  KEY `USER_NAME` (`USER_NAME`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `IS_DELETE` (`IS_DELETE`),
  KEY `ORDER_TYPE` (`ORDER_TYPE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商品订单';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ORDER_GOODS`
--

DROP TABLE IF EXISTS `AR_ORDER_GOODS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `ORDER_SN` (`ORDER_SN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='订单中包含的商品';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ORDER_GOODS_SHOP`
--

DROP TABLE IF EXISTS `AR_ORDER_GOODS_SHOP`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_ORDER_GOODS_SHOP` (
  `ID` varchar(32) NOT NULL,
  `ORDER_SN` 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 `ORDER_SN` (`ORDER_SN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='订单中包含的商品';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_ORDER_SHOP`
--

DROP TABLE IF EXISTS `AR_ORDER_SHOP`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_ORDER_SHOP` (
  `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 DEFAULT NULL,
  `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` varchar(32) DEFAULT '0',
  `CITY` varchar(32) DEFAULT '0',
  `COUNTY` varchar(32) DEFAULT '0',
  `ADDRESS` varchar(255) 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',
  `WAREHOUSE` varchar(16) NOT NULL DEFAULT '01',
  PRIMARY KEY (`ID`),
  KEY `SN` (`SN`),
  KEY `USER_ID` (`USER_ID`),
  KEY `USER_NAME` (`USER_NAME`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `IS_DELETE` (`IS_DELETE`),
  KEY `ORDER_TYPE` (`ORDER_TYPE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商品订单';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_PERF_AUDIT`
--

DROP TABLE IF EXISTS `AR_PERF_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='调整业绩审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_PERF_COMPANY`
--

DROP TABLE IF EXISTS `AR_PERF_COMPANY`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='公司总业绩';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_PERF_MONTH`
--

DROP TABLE IF EXISTS `AR_PERF_MONTH`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 `CALC_MONTH` (`CALC_MONTH`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='月业绩记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_PERF_ORDER`
--

DROP TABLE IF EXISTS `AR_PERF_ORDER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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(9) 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(9) 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`),
  KEY `USER_ID` (`USER_ID`),
  KEY `DEC_USER_ID` (`DEC_USER_ID`),
  KEY `DEC_TYPE` (`DEC_TYPE`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='业绩单';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_PERF_PERIOD`
--

DROP TABLE IF EXISTS `AR_PERF_PERIOD`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='业绩记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_PERIOD`
--

DROP TABLE IF EXISTS `AR_PERIOD`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `IS_CLOSED` (`IS_CLOSED`),
  KEY `IS_PERFED` (`IS_PERFED`),
  KEY `IS_CALCULATED` (`IS_CALCULATED`),
  KEY `IS_SENT` (`IS_SENT`),
  KEY `IS_PERFING` (`IS_PERFING`),
  KEY `IS_CALCING` (`IS_CALCING`),
  KEY `IS_SENDING` (`IS_SENDING`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='期数';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_RECEIVE_ADDRESS`
--

DROP TABLE IF EXISTS `AR_RECEIVE_ADDRESS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `USER_NAME` (`USER_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='收货地址';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_RECHARGE`
--

DROP TABLE IF EXISTS `AR_RECHARGE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_RECHARGE` (
  `ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `SN` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `USER_ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `ID_CARD` varchar(20) COLLATE utf8mb4_general_ci 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) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `OPEN_BANK` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BANK_ADDRESS` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BANK_NO` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BANK_PROVINCE` int(6) DEFAULT NULL,
  `BANK_CITY` int(6) DEFAULT NULL,
  `BANK_COUNTY` int(9) DEFAULT NULL,
  `P_MONTH` date NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `BANK_PROVE` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `REMARK` text COLLATE utf8mb4_general_ci DEFAULT NULL,
  `AUDIT_ADMIN` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `SN` (`SN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='充值申请';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_REGION`
--

DROP TABLE IF EXISTS `AR_REGION`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_REGION` (
  `ID` varchar(32) NOT NULL,
  `REGION_CODE` int(9) NOT NULL DEFAULT '0',
  `DEEP` tinyint(2) NOT NULL DEFAULT '0',
  `REGION_NAME` varchar(128) NOT NULL DEFAULT '',
  `PID` int(9) 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='地区';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_REG_INFO_AUDIT`
--

DROP TABLE IF EXISTS `AR_REG_INFO_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `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`),
  KEY `REG_TYPE` (`REG_TYPE`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员注册信息审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_REG_TYPE`
--

DROP TABLE IF EXISTS `AR_REG_TYPE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='聘级';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_RESEND_QY`
--

DROP TABLE IF EXISTS `AR_RESEND_QY`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='总奖金结算记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_RESEND_QY_AUDIT`
--

DROP TABLE IF EXISTS `AR_RESEND_QY_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='补发区域津贴审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_SHOP_GOODS`
--

DROP TABLE IF EXISTS `AR_SHOP_GOODS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT 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 COLLATE=utf8mb4_bin COMMENT='商品';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_SMS_API`
--

DROP TABLE IF EXISTS `AR_SMS_API`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_SMS_API` (
  `ID` varchar(32) NOT NULL,
  `API_NAME` varchar(48) NOT NULL,
  `DESCRIPTION` varchar(255) NOT NULL,
  `CONFIG` text DEFAULT NULL,
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='SMS短信接口表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_SMS_TEMPLATE`
--

DROP TABLE IF EXISTS `AR_SMS_TEMPLATE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='短信模板';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_TASK_QUEUE`
--

DROP TABLE IF EXISTS `AR_TASK_QUEUE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='任务队列列表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_TMP_FREEZE_USER`
--

DROP TABLE IF EXISTS `AR_TMP_FREEZE_USER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_TMP_FREEZE_USER` (
  `ID` varchar(32) NOT NULL,
  `USER_NAME` varchar(16) NOT NULL,
  `REAL_NAME` varchar(128) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='冻结会员表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_TMP_OLD_NETWORK`
--

DROP TABLE IF EXISTS `AR_TMP_OLD_NETWORK`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`),
  KEY `NET_USER_NAME` (`NET_USER_NAME`),
  KEY `SORT` (`SORT`),
  KEY `NET_DEEP` (`NET_DEEP`),
  KEY `REC_DEEP` (`REC_DEEP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='老系统会员关系临时表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_TMP_OLD_NETWORK_ERROR`
--

DROP TABLE IF EXISTS `AR_TMP_OLD_NETWORK_ERROR`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_TMP_OLD_NETWORK_ERROR` (
  `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`),
  KEY `PARENT_USER_NAME` (`PARENT_USER_NAME`),
  KEY `NET_USER_NAME` (`NET_USER_NAME`),
  KEY `SORT` (`SORT`),
  KEY `NET_DEEP` (`NET_DEEP`),
  KEY `REC_DEEP` (`REC_DEEP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='补充会员表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_TMP_OLD_USER`
--

DROP TABLE IF EXISTS `AR_TMP_OLD_USER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `REC_USER_NAME` (`REC_USER_NAME`),
  KEY `NET_USER_NAME` (`NET_USER_NAME`),
  KEY `SORT` (`SORT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='老系统会员关系临时表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_TRANSFER`
--

DROP TABLE IF EXISTS `AR_TRANSFER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `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 COLLATE=utf8mb4_bin COMMENT='转账记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_UPLOADS`
--

DROP TABLE IF EXISTS `AR_UPLOADS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='上传文件表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER`
--

DROP TABLE IF EXISTS `AR_USER`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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(9) 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(9) 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(9) 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 DEFAULT NULL,
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_BIND`
--

DROP TABLE IF EXISTS `AR_USER_BIND`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `MAIN_UID` (`MAIN_UID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='点位合作';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_BONUS`
--

DROP TABLE IF EXISTS `AR_USER_BONUS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='会员奖金表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_CLOSE`
--

DROP TABLE IF EXISTS `AR_USER_CLOSE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `TYPE` (`TYPE`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `IS_CLOSE` (`IS_CLOSE`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员关停和停发表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_INFO`
--

DROP TABLE IF EXISTS `AR_USER_INFO`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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',
  `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 '',
  `ZC_AMOUNT` decimal(16,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `USER_ID` (`USER_ID`),
  KEY `USER_NAME_DELETED` (`USER_NAME`,`DELETED`),
  KEY `NETWORK_DEEP` (`NETWORK_DEEP`),
  KEY `RELATION_DEEP` (`RELATION_DEEP`),
  KEY `REC_UID` (`REC_UID`),
  KEY `CON_UID` (`CON_UID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员资料表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_MOVE`
--

DROP TABLE IF EXISTS `AR_USER_MOVE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_USER_MOVE` (
  `ID` varchar(32) NOT NULL,
  `USER_ID` varchar(32) NOT NULL,
  `USER_TOP_DEEP` int(10) unsigned NOT NULL DEFAULT '0',
  `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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `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`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员移网记录';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_NETWORK`
--

DROP TABLE IF EXISTS `AR_USER_NETWORK`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `PARENT_UID` (`PARENT_UID`),
  KEY `LOCATION` (`LOCATION`),
  KEY `TOP_DEEP` (`TOP_DEEP`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='安置关系表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_NETWORK_NEW`
--

DROP TABLE IF EXISTS `AR_USER_NETWORK_NEW`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_USER_NETWORK_NEW` (
  `ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `USER_ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `PARENT_UID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '安置人ID',
  `LOCATION_TAG` varchar(5000) COLLATE utf8mb4_general_ci NOT NULL COMMENT '网体标记',
  `RELATIVE_LOCATION` tinyint(1) NOT NULL DEFAULT '0' COMMENT '相对父级的区位',
  `TOP_UID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '顶级会员ID',
  `TOP_DEEP` int(10) NOT NULL DEFAULT '0' COMMENT '总网体中层数',
  `PARENT_UIDS` longtext COLLATE utf8mb4_general_ci NOT NULL COMMENT '所有上级ID',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `USER_ID` (`USER_ID`),
  KEY `PARENT_UID` (`PARENT_UID`),
  KEY `TOP_DEEP` (`TOP_DEEP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='新安置关系表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_PERF`
--

DROP TABLE IF EXISTS `AR_USER_PERF`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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',
  `SURPLUS_1L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_2L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_3L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_4L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_5L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `PV_PSS_TOTAL` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员累计业绩表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_PERF_NEW`
--

DROP TABLE IF EXISTS `AR_USER_PERF_NEW`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_USER_PERF_NEW` (
  `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',
  `SURPLUS_1L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_2L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_3L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_4L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `SURPLUS_5L` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  `PV_PSS_TOTAL` decimal(16,2) unsigned NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员累计业绩表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_PERF_UPDATE`
--

DROP TABLE IF EXISTS `AR_USER_PERF_UPDATE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员累计业绩更新期数';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_PERIOD_POINTS`
--

DROP TABLE IF EXISTS `AR_USER_PERIOD_POINTS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `EXPIRED` (`EXPIRED`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='用户期数复消积分记录表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_RELATION`
--

DROP TABLE IF EXISTS `AR_USER_RELATION`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `PARENT_UID` (`PARENT_UID`),
  KEY `TOP_DEEP` (`TOP_DEEP`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='开拓关系表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_RELATION_NEW`
--

DROP TABLE IF EXISTS `AR_USER_RELATION_NEW`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_USER_RELATION_NEW` (
  `ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `USER_ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `PARENT_UID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '上级ID',
  `TOP_UID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '顶级会员ID',
  `TOP_DEEP` int(10) NOT NULL DEFAULT '0' COMMENT '开拓总深度',
  `PARENT_UIDS` longtext COLLATE utf8mb4_general_ci NOT NULL COMMENT '所有的上级ID',
  `CREATED_AT` int(10) NOT NULL COMMENT '创建时间',
  `UPDATED_AT` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `USER_ID` (`USER_ID`),
  KEY `PARENT_UID` (`PARENT_UID`),
  KEY `TOP_DEEP` (`TOP_DEEP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='新开拓关系表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_STATUS_AUDIT`
--

DROP TABLE IF EXISTS `AR_USER_STATUS_AUDIT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `AUDIT_REMARK` text DEFAULT NULL,
  `CREATED_AT` int(10) NOT NULL,
  `AUDITED_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `USER_ID` (`USER_ID`),
  KEY `PERIOD_NUM` (`PERIOD_NUM`),
  KEY `AUDIT_STATUS` (`AUDIT_STATUS`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员状态审核表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_SYSTEM`
--

DROP TABLE IF EXISTS `AR_USER_SYSTEM`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `UPDATE_REMARK` text DEFAULT NULL,
  `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`),
  UNIQUE KEY `LEADER_UID` (`LEADER_UID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员体系';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_TEAMWORK`
--

DROP TABLE IF EXISTS `AR_USER_TEAMWORK`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 DEFAULT NULL,
  `UPDATE_REMARK` text DEFAULT NULL,
  `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`),
  KEY `MAIN_UID` (`MAIN_UID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='点位合作';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_TOKEN`
--

DROP TABLE IF EXISTS `AR_USER_TOKEN`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `USER_ID` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员TOKEN表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_USER_WALLET`
--

DROP TABLE IF EXISTS `AR_USER_WALLET`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='钱包';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_WITHDRAW`
--

DROP TABLE IF EXISTS `AR_WITHDRAW`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AR_WITHDRAW` (
  `ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `SN` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `USER_ID` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `ID_CARD` varchar(20) COLLATE utf8mb4_general_ci 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',
  `FEES` decimal(16,2) NOT NULL DEFAULT '0.00',
  `REAL_AMOUNT` decimal(16,2) NOT NULL DEFAULT '0.00',
  `INVOICE_ID` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `REAL_NAME` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `OPEN_BANK` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BANK_ADDRESS` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BANK_NO` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BANK_PROVINCE` int(6) DEFAULT NULL,
  `BANK_CITY` int(6) DEFAULT NULL,
  `BANK_COUNTY` int(9) DEFAULT NULL,
  `P_MONTH` date NOT NULL,
  `AUDIT_STATUS` tinyint(1) NOT NULL DEFAULT '0',
  `REMARK` text COLLATE utf8mb4_general_ci DEFAULT NULL,
  `UPDATE_ADMIN` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `UPDATE_REMARK` text COLLATE utf8mb4_general_ci DEFAULT NULL,
  `AUDIT_ADMIN` varchar(32) COLLATE utf8mb4_general_ci 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 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `PAID_FAIL_AT` int(10) NOT NULL DEFAULT '0',
  `BACK_REMARK` text COLLATE utf8mb4_general_ci DEFAULT NULL,
  `BACK_FAIL_AT` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `SN` (`SN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='提现申请';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_WITHDRAW_LEVEL`
--

DROP TABLE IF EXISTS `AR_WITHDRAW_LEVEL`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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 COLLATE=utf8mb4_bin COMMENT='提现金额等级';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AR_YEAR_HIGHEST_EMP_LV`
--

DROP TABLE IF EXISTS `AR_YEAR_HIGHEST_EMP_LV`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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`),
  KEY `YEAR` (`YEAR`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='会员年度最高聘级';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-07-28 10:30:46
