-- ----------------------------
--  Data for `dt_message_send_register`
-- ----------------------------
CREATE TABLE IF NOT EXISTS "dt_message_send_register" (
"id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
"code" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送渠道编码',
"name" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送渠道名称',
"access_key" varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'accessKey',
"access_secret" text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT 'accessSecret',
"extra" text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '扩展参数',
"clazz" varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送消息实现类',
"creator" varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
"creation_time" char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建时间',
"modifier" varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后修改人',
"modified_time" char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后修改时间',
"valid" tinyint(1) DEFAULT NULL COMMENT '合法标识',
"ts" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
PRIMARY KEY ("id") USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;


-- ----------------------------
--  Data for `dt_message_type`
-- ----------------------------
CREATE TABLE IF NOT EXISTS "dt_message_type" (
"id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
"type_code" varchar(40) NOT NULL COMMENT '消息类型编码',
"type_name" varchar(40) NOT NULL COMMENT '消息类型名称',
"send_channel" varchar(255) NOT NULL,
"remark" text COMMENT '备注',
"creator" varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
"creation_time" char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建时间',
"modifier" varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后修改人',
"modified_time" char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后修改时间',
"valid" tinyint(1) DEFAULT NULL COMMENT '合法标识',
"ts" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
PRIMARY KEY ("id") USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;


-- ----------------------------
--  Data for `dt_message`
-- ----------------------------
CREATE TABLE IF NOT EXISTS "dt_message" (
"id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
"type_id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息类型',
"user_id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '接收用户',
"title" varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息标题',
"content" text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '消息详情',
"business_id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '关联业务主键',
"project_id" varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属项目',
"send_channel" varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发送渠道',
"read_flag" tinyint(1) DEFAULT NULL COMMENT '已读标示',
"top_flag" tinyint(1) DEFAULT NULL COMMENT '置顶标示',
"creator" varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
"creation_time" char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建时间',
"modifier" varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后修改人',
"modified_time" char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后修改时间',
"valid" tinyint(1) DEFAULT NULL COMMENT '合法标识',
"ts" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
PRIMARY KEY ("id") USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;