/*
 Navicat Premium Dump SQL

 Source Server         : DEV-Mysql
 Source Server Type    : MySQL
 Source Server Version : 50743 (5.7.43-log)
 Source Host           : mysql.develop.qifu.com:30336
 Source Schema         : dev_qifu_saas_eg

 Target Server Type    : MySQL
 Target Server Version : 50743 (5.7.43-log)
 File Encoding         : 65001

 Date: 08/02/2025 15:05:51
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for eg_express
-- ----------------------------
DROP TABLE IF EXISTS `eg_express`;
CREATE TABLE `eg_express`
(
    `id`                  bigint(20)                                                    NOT NULL AUTO_INCREMENT,
    `channel`             varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '渠道编码',
    `company`             varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '公司编码',
    `number`              varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '快递单号',
    `send_man_mobile`     varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '发送人手机号',
    `send_man_name`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '发送人名称',
    `send_man_print_addr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送人地址',
    `rec_man_mobile`      varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '接收人手机号',
    `rec_man_name`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '接收人名称',
    `rec_man_print_addr`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接收人地址',
    `cargo`               varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '物流物品名称',
    `state`               varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '99999' COMMENT '状态：默认 99999',
    `send_country`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送国家',
    `send_province`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送省',
    `send_city`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送市',
    `send_district`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送街道',
    `rec_country`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接收国家',
    `rec_province`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接收省',
    `rec_city`            varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接收市',
    `rec_district`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接收街道',
    `delivered_days`      int(4)                                                        NOT NULL DEFAULT 0 COMMENT '交货时间 和 收货时间的天数',
    `receipt_days`        int(4)                                                        NOT NULL DEFAULT 0 COMMENT '收货时间 和 发货时间的天数',
    `transit_days`        int(4)                                                        NOT NULL DEFAULT 0 COMMENT '当前时间 和 收货时间 之间的天数，停止更新',
    `stay_days`           int(4)                                                        NOT NULL DEFAULT 0 COMMENT '货件停止更新的天数',
    `create_user_id`      bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '创建人ID',
    `create_by`           varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`         bigint(20)                                                    NOT NULL COMMENT '创建时间',
    `update_user_id`      bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新人id',
    `update_by`           varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`         bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`             bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '是否删除：0=否，id=是',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 9
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '物流信息表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_express_company_mapping
-- ----------------------------
DROP TABLE IF EXISTS `eg_express_company_mapping`;
CREATE TABLE `eg_express_company_mapping`
(
    `id`             bigint(20)                                                   NOT NULL AUTO_INCREMENT,
    `channel`        varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '来源渠道',
    `code`           varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司编码',
    `out_code`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '外部公司编码',
    `cn_name`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '公司名称',
    `us_name`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '公司名称英文',
    `out_cn_name`    varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '外部公司名称',
    `out_us_name`    varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '外部公司名称英文',
    `create_user_id` bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '创建人id',
    `create_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`    bigint(20)                                                   NOT NULL COMMENT '创建时间',
    `update_user_id` bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '更新人ID',
    `update_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`    bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`        bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '删除标识：0=未删除，id=以删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 9
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '物流公司映射表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_express_order
-- ----------------------------
DROP TABLE IF EXISTS `eg_express_order`;
CREATE TABLE `eg_express_order`
(
    `id`              bigint(20)                                                   NOT NULL AUTO_INCREMENT,
    `request_id`      bigint(20)                                                   NOT NULL COMMENT '请求id',
    `trx_id`          bigint(20)                                                   NOT NULL COMMENT '流水id',
    `channel`         varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '来源渠道',
    `company`         varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司编码',
    `number`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '快递单号',
    `send_man_mobile` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '发送人手机',
    `rec_man_mobile`  varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接收人手机',
    `create_user_id`  bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '创建人id',
    `create_by`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`     bigint(20)                                                   NOT NULL COMMENT '创建时间',
    `update_user_id`  bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '更新人ID',
    `update_by`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`     bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`         bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '删除标识：0=未删除，id=以删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 2
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '物流下单表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_express_register
-- ----------------------------
DROP TABLE IF EXISTS `eg_express_register`;
CREATE TABLE `eg_express_register`
(
    `id`             bigint(20)                                                    NOT NULL AUTO_INCREMENT,
    `channel`        varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '渠道编码',
    `company`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '公司编码',
    `number`         varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '快递单号',
    `status`         int(2)                                                        NOT NULL DEFAULT 1 COMMENT '状态：1=待注册，2=注册成功，3=注册失败',
    `message`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '成功或者失败信息',
    `retry_times`    int(2)                                                        NOT NULL DEFAULT 0 COMMENT '重试次数',
    `create_user_id` bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '创建人ID',
    `create_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`    bigint(20)                                                    NOT NULL COMMENT '创建时间',
    `update_user_id` bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新人id',
    `update_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`    bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`        bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '是否删除：0=否，id=是',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 4
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '物流追踪注册'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_express_tracking
-- ----------------------------
DROP TABLE IF EXISTS `eg_express_tracking`;
CREATE TABLE `eg_express_tracking`
(
    `id`             bigint(20)                                                    NOT NULL AUTO_INCREMENT,
    `channel`        varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '来源渠道',
    `company`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '公司编码',
    `number`         varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '快递单号',
    `time`           varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '请求状态',
    `time_long`      bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '错误信息',
    `context`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '节点事件内容',
    `country`        varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '国家',
    `province`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '省',
    `city`           varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '市',
    `district`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '街道',
    `address`        varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
    `status`         varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '物流状态',
    `coordinates`    varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '坐标',
    `create_user_id` bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '创建人id',
    `create_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`    bigint(20)                                                    NOT NULL COMMENT '创建时间',
    `update_user_id` bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新人ID',
    `update_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`    bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`        bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '删除标识：0=未删除，id=以删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 38
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '物流追踪表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_express_waybill
-- ----------------------------
DROP TABLE IF EXISTS `eg_express_waybill`;
CREATE TABLE `eg_express_waybill`
(
    `id`              bigint(20)                                                    NOT NULL AUTO_INCREMENT,
    `channel`         varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '渠道编码',
    `company`         varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '公司编码',
    `company_channel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '物流公司渠道',
    `number`          varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL COMMENT '快递单号',
    `biz_type`        int(4)                                                        NOT NULL DEFAULT 1 COMMENT '业务类型：1=出库单',
    `biz_code`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '业务编码',
    `status`          int(4)                                                        NOT NULL DEFAULT 1 COMMENT '状态，1=待处理，2=成功，3=失败',
    `original_url`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '源电子面单链接',
    `oss_obj_name`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'OSS文件名称',
    `file_type`       varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT 'pdf' COMMENT '文件类型',
    `file_name`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '文件名称',
    `create_user_id`  bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '创建人ID',
    `create_by`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`     bigint(20)                                                    NOT NULL COMMENT '创建时间',
    `update_user_id`  bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新人id',
    `update_by`       varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`     bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`         bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '是否删除：0=否，id=是',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 1
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '物流电子面单信息'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_request_flow_control
-- ----------------------------
DROP TABLE IF EXISTS `eg_request_flow_control`;
CREATE TABLE `eg_request_flow_control`
(
    `id`             bigint(20)                                                   NOT NULL AUTO_INCREMENT,
    `biz_code`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '业务编码',
    `biz_name`       varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '业务名称',
    `limit_type`     int(4)                                                       NOT NULL DEFAULT 1 COMMENT '限制类型：1=令牌桶',
    `limit_time`     int(8)                                                       NOT NULL DEFAULT 1 COMMENT '限制时间',
    `limit_unit`     int(4)                                                       NOT NULL DEFAULT 1 COMMENT '限制时间单位：1=秒',
    `limit_quantity` int(8)                                                       NOT NULL DEFAULT 1 COMMENT '限制请求量',
    `create_user_id` bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '创建人id',
    `create_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`    bigint(20)                                                   NOT NULL COMMENT '创建时间',
    `update_user_id` bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '更新人ID',
    `update_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`    bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`        bigint(20)                                                   NOT NULL DEFAULT 0 COMMENT '删除标识：0=未删除，id=以删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 1
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '请求流量控制表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_request_info
-- ----------------------------
DROP TABLE IF EXISTS `eg_request_info`;
CREATE TABLE `eg_request_info`
(
    `id`             bigint(20)                                                     NOT NULL AUTO_INCREMENT,
    `request_id`     bigint(20)                                                     NOT NULL COMMENT '请求id：客户端生成',
    `trx_id`         bigint(20)                                                     NOT NULL COMMENT '请求记录id：服务端生成',
    `request_time`   bigint(20)                                                     NOT NULL COMMENT '请求时间',
    `request_type`   int(4)                                                         NOT NULL COMMENT '请求类型：比如下运单，查物流等',
    `exec_type`      int(2)                                                         NOT NULL DEFAULT 1 COMMENT '执行类型：1=同步，2=异步',
    `request_status` int(2)                                                         NOT NULL DEFAULT 1 COMMENT '请求状态',
    `attach_info`    text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci          NOT NULL COMMENT '附加信息',
    `callback_url`   varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '异步回调链接',
    `create_user_id` bigint(20)                                                     NOT NULL DEFAULT 0 COMMENT '创建人id',
    `create_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`    bigint(20)                                                     NOT NULL COMMENT '创建时间',
    `update_user_id` bigint(20)                                                     NOT NULL DEFAULT 0 COMMENT '更新人ID',
    `update_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci   NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`    bigint(20)                                                     NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`        bigint(20)                                                     NOT NULL DEFAULT 0 COMMENT '删除标识：0=未删除，id=以删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 31
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '请求信息表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eg_request_info_detail
-- ----------------------------
DROP TABLE IF EXISTS `eg_request_info_detail`;
CREATE TABLE `eg_request_info_detail`
(
    `id`             bigint(20)                                                    NOT NULL AUTO_INCREMENT,
    `trx_id`         bigint(20)                                                    NOT NULL COMMENT '请求记录id：服务端生成',
    `request_info`   text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NOT NULL COMMENT '请求信息',
    `response_info`  text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NULL COMMENT '结果信息',
    `status`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '20000' COMMENT '请求状态',
    `error_message`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL     DEFAULT NULL COMMENT '错误信息',
    `create_user_id` bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '创建人id',
    `create_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`    bigint(20)                                                    NOT NULL COMMENT '创建时间',
    `update_user_id` bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新人ID',
    `update_by`      varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`    bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '更新时间',
    `deleted`        bigint(20)                                                    NOT NULL DEFAULT 0 COMMENT '删除标识：0=未删除，id=以删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 30
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci COMMENT = '请求信息详情表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for magic_api_file
-- ----------------------------
DROP TABLE IF EXISTS `magic_api_file`;
CREATE TABLE `magic_api_file`
(
    `file_path`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
    `file_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci         NULL
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_general_ci
  ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


CREATE TABLE `eg_wework_event_approval_message`
(
    `id`              bigint(20)  NOT NULL AUTO_INCREMENT,
    `app`             varchar(20) NOT NULL COMMENT '应用编码',
    `sp_no`           varchar(50) NOT NULL COMMENT '审批号',
    `event_message`   text                 DEFAULT NULL COMMENT '事件消息',
    `approval_detail` text                 DEFAULT NULL COMMENT '审批详情',
    `create_user_id`  bigint(20)  NOT NULL DEFAULT '0' COMMENT '创建人ID',
    `create_by`       varchar(32) NOT NULL DEFAULT '' COMMENT '创建人名称',
    `create_time`     bigint(20)  NOT NULL COMMENT '创建时间',
    `update_user_id`  bigint(20)  NOT NULL DEFAULT '0' COMMENT '更新人id',
    `update_by`       varchar(32) NOT NULL DEFAULT '' COMMENT '更新人名称',
    `update_time`     bigint(20)  NOT NULL DEFAULT '0' COMMENT '更新时间',
    `deleted`         bigint(20)  NOT NULL DEFAULT '0' COMMENT '是否删除：0=否，id=是',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 9
  DEFAULT CHARSET = utf8mb4 COMMENT ='审批信息表';

ALTER TABLE `eg_wework_event_approval_message`
    ADD INDEX `idx_app_sp_no`(`app`, `sp_no`) USING BTREE;

ALTER TABLE `eg_express_register`
    ADD INDEX `idx_number_channel_company`(`number`, `channel`, `company`) USING BTREE,
    ADD INDEX `idx_create_time`(`create_time`) USING BTREE;

ALTER TABLE `eg_express`
    ADD INDEX `idx_number_channel_company`(`number`, `channel`, `company`) USING BTREE;

ALTER TABLE `eg_express_tracking`
    ADD INDEX `idx_number_channel_company`(`number`, `channel`, `company`) USING BTREE;