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

92 lines
4.8 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.

DROP TABLE IF EXISTS `event`;
CREATE TABLE `event`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`app_id` varchar(255) DEFAULT NULL COMMENT '关联查找secret',
`type` varchar(255) DEFAULT NULL COMMENT '事件类型',
`app_token` varchar(255) DEFAULT NULL COMMENT '文件id',
`table_id` varchar(255) DEFAULT NULL COMMENT '表格id',
`record_id` varchar(255) DEFAULT NULL COMMENT '行id',
`numbers` int DEFAULT '0' COMMENT '重推次数',
`operate_status` 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;
DROP TABLE IF EXISTS `event_log`;
CREATE TABLE `event_log`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`event_id` bigint DEFAULT NULL,
`operate_type` varchar(255) DEFAULT NULL COMMENT '操作类型',
`operate_info` text COMMENT '操作日志',
`error_code` varchar(255) DEFAULT NULL COMMENT '错误编码',
`error_message` varchar(255) DEFAULT NULL COMMENT '错误信息',
`remark` 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,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
DROP TABLE IF EXISTS `lark_company_relation`;
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对应的唯一密钥',
`app_type` varchar(255) DEFAULT NULL COMMENT 'app应用类型',
`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;
DROP TABLE IF EXISTS `lark_table_relation`;
CREATE TABLE `lark_table_relation`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`lark_company_relation_id` bigint DEFAULT NULL COMMENT '公司与飞书关联表id',
`from_app_token` varchar(255) DEFAULT NULL,
`from_table_id` varchar(255) DEFAULT NULL COMMENT '来源表',
`to_app_token` varchar(255) DEFAULT NULL,
`to_table_id` 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;
DROP TABLE IF EXISTS `lark_table_row_relation`;
CREATE TABLE `lark_table_row_relation`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '唯一主键',
`table_relation_id` bigint DEFAULT NULL COMMENT '公司与飞书关联表id',
`from_id` varchar(255) DEFAULT NULL COMMENT '来源表',
`to_id` varchar(255) DEFAULT NULL COMMENT '对应更新表',
`type` varchar(20) DEFAULT NULL COMMENT '行,或者 列',
`sub_type` varchar(20) 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;