You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RuoYi-flowable-bak/sql/lark.sql

72 lines
3.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

-- 飞书-公司关联表
CREATE TABLE `lark_company_relation`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`company_id` bigint DEFAULT NULL COMMENT '公司id',
`company_name` varchar(255) DEFAULT NULL COMMENT '公司名称',
`app_id` varchar(255) NOT NULL COMMENT '飞书的appId',
`secret` varchar(255) NOT NULL COMMENT '公司+appId对应的唯一密钥',
`create_by` varchar(255) NOT NULL,
`create_time` datetime NOT NULL,
`update_by` varchar(255) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`flag` tinyint NOT NULL DEFAULT '0' COMMENT '删除标记0未删除、1已删除',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
-- AppId-table关联表
CREATE TABLE `lark_table_relation`
(
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`lark_company_relation_id` BIGINT DEFAULT NULL COMMENT '公司与飞书关联表id',
`from_table_id` VARCHAR(255) DEFAULT NULL COMMENT '来源表',
`to_table_id` VARCHAR(255) DEFAULT NULL COMMENT '对应更新表',
`url` BIGINT DEFAULT NULL COMMENT 'url地址',
`create_by` VARCHAR(255) NOT NULL,
`create_time` datetime NOT NULL,
`update_by` VARCHAR(255) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`flag` TINYINT NOT NULL DEFAULT '0' COMMENT '删除标记0未删除、1已删除',
`remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE = INNODB;
-- 事务操作日志
CREATE TABLE `event_log`
(
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`table_id` VARCHAR(255) DEFAULT NULL COMMENT '多维表格id',
`record_id` VARCHAR(255) DEFAULT NULL COMMENT '实际行id',
`event_id` BIGINT DEFAULT NULL COMMENT '实际事务id',
`operate_type` VARCHAR(255) DEFAULT NULL COMMENT '操作类型',
`operate_status` VARCHAR(255) DEFAULT NULL COMMENT '操作编码',
`error_code` VARCHAR(255) DEFAULT NULL COMMENT '错误编码',
`error_message` VARCHAR(255) DEFAULT NULL COMMENT '错误信息',
`create_by` VARCHAR(255) NOT NULL,
`create_time` datetime NOT NULL,
`update_by` VARCHAR(255) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`flag` TINYINT NOT NULL DEFAULT '0' COMMENT '删除标记0未删除、1已删除',
`remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE = INNODB;
-- 事务详情
CREATE TABLE `event`
(
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`message` text DEFAULT NULL COMMENT '回调信息',
`create_by` VARCHAR(255) NOT NULL,
`create_time` datetime NOT NULL,
`update_by` VARCHAR(255) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`flag` VARCHAR(20) NOT NULL COMMENT '状态标记pending处理中、success成功、faild失败',
`remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE = INNODB;