USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wm_agent_comp_doc
-- ----------------------------
DROP TABLE IF EXISTS `wm_agent_comp_doc`;
CREATE TABLE `wm_agent_comp_doc`
(
    `doc_id`            BIGINT UNSIGNED AUTO_INCREMENT NOT NULL COMMENT '主键ID',
    `dept_id`           INT                            NOT NULL COMMENT '代理商ID',
    `emp_book`          JSON COMMENT '员工规范手册',
    `ctrl_sys_manu`     JSON COMMENT '内部控制制度手册',
    `inter_audit_doc`   JSON COMMENT '内部审计文件',
    `comp_mant_sys`     JSON COMMENT '合规制度管理',
    `anti_corr_bri_sys` JSON COMMENT '反腐败和反贿赂制度',
    `emp_man_sys`       JSON COMMENT '员工招待管理制度',
    `comp_commit_let`   JSON COMMENT '合规承诺函',
    `inner_train_doc`   JSON COMMENT '内部合规培训材料',
    `create_by`         VARCHAR(64)                    NOT NULL COMMENT '创建人',
    `update_by`         VARCHAR(64)                    NOT NULL COMMENT '修改人',
    `create_time`       DATETIME                       NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time`       DATETIME                       NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
    PRIMARY KEY `pk_id` (`doc_id`),
    UNIQUE KEY `uk_did` (`dept_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci
  ROW_FORMAT = DYNAMIC COMMENT ='服务商合规文件';


-- ----------------------------
-- Records of wm_agent_comp_doc
-- ----------------------------
BEGIN;
COMMIT;


SET FOREIGN_KEY_CHECKS = 1;
