USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wm_pkg_rdp
-- ----------------------------
DROP TABLE IF EXISTS `wm_pkg_rdp`;
CREATE TABLE `wm_pkg_rdp`
(
    `notice_id`      BIGINT UNSIGNED AUTO_INCREMENT                                 NOT NULL COMMENT '通知ID',
    `pkg_id`         BIGINT UNSIGNED                                                NOT NULL COMMENT '积分包ID',
    `step`           INT(1)                                                         NOT NULL COMMENT '步进',
    `rdp_res`        JSON                                                           NULL COMMENT '通知信息',
    `from_id`        BIGINT UNSIGNED                                                NOT NULL COMMENT '发起企业ID',
    `to_id`          BIGINT UNSIGNED                                                NOT NULL COMMENT '目标企业ID',
    `cur_rdp_score`  BIGINT UNSIGNED                                                NOT NULL COMMENT '本次兑付分值',
    `cur_rdp_rate`   VARCHAR(32)                                                    NOT NULL COMMENT '本次兑付比例',
    `cur_rdp_weight` VARCHAR(32)                                                    NOT NULL COMMENT '本次兑付权重',
    `notice_state`   VARCHAR(32)                                                    NOT NULL COMMENT '通知状态',
    `accept`         TINYINT(1)                                                     NULL COMMENT '接受结果',
    `accept_remarks` VARCHAR(512)                                                   NULL COMMENT '接受说明',
    `accept_time`    DATETIME                                                       NULL COMMENT '接受时间',
    `create_by`      VARCHAR(32)                                                    NOT NULL COMMENT '创建人',
    `update_by`      VARCHAR(32)                                                    NOT NULL COMMENT '更新人',
    `create_time`    DATETIME DEFAULT CURRENT_TIMESTAMP                             NOT NULL COMMENT '创建时间',
    `update_time`    DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
    PRIMARY KEY `pk_id` (`notice_id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci
  ROW_FORMAT = DYNAMIC COMMENT ='执行包兑付通知';


-- ----------------------------
-- Records of wm_pkg_rdp
-- ----------------------------
BEGIN;
COMMIT;


SET FOREIGN_KEY_CHECKS = 1;
