CREATE TABLE `AR_APPROACH_DEC_ORDER` (
     `ID` varchar(32) COLLATE utf8mb4_bin NOT NULL,
     `DEC_SN` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
     `ORDER_SN` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
     `USER_ID` varchar(32) COLLATE utf8mb4_bin NOT NULL,
     `TO_USER_ID` varchar(32) COLLATE utf8mb4_bin NOT NULL,
     `TYPE` varchar(32) COLLATE utf8mb4_bin 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) COLLATE utf8mb4_bin NOT NULL,
     `IS_BATCH` tinyint(1) NOT NULL DEFAULT 0,
     `STATUS` tinyint(1) NOT NULL DEFAULT 0 COMMENT '支付状态',
     `REMARK` text COLLATE utf8mb4_bin DEFAULT NULL,
     `REC_USER_ID` varchar(32) COLLATE utf8mb4_bin DEFAULT '',
     `CON_USER_ID` varchar(32) COLLATE utf8mb4_bin 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) COLLATE utf8mb4_bin DEFAULT '',
     `UPDATED_AT` varchar(32) COLLATE utf8mb4_bin NOT NULL DEFAULT '0',
     `IS_DEL` tinyint(1) NOT NULL DEFAULT 0,
     `DELETED_AT` int(10) NOT NULL DEFAULT 0,
     `DEC_ID` varchar(32) COLLATE utf8mb4_bin DEFAULT '',
     `DETAIL_TYPE` tinyint(1) NOT NULL DEFAULT 1 COMMENT '默认为1注册 2为升级',
     `UPGRADE_TYPE` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 补差额升级 2全额升级',
     `ORI_LV` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '升级前的级别',
     `UPGRADE_LV` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '升级后的级别',
     PRIMARY KEY (`ID`) USING BTREE,
     UNIQUE KEY `DEC_SN` (`DEC_SN`) USING BTREE,
     KEY `USER_ID` (`USER_ID`) USING BTREE,
     KEY `TYPE` (`TYPE`) USING BTREE,
     KEY `PERIOD_NUM` (`PERIOD_NUM`) USING BTREE,
     KEY `IS_DEL` (`IS_DEL`) USING BTREE,
     KEY `ORDER_SN` (`ORDER_SN`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='报单中间表';