Skip to content

Commit

Permalink
扩展流程实例实体类冗余流程名称
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Sep 13, 2024
1 parent 17dd250 commit 8ebd407
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions db/flowlong-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ CREATE TABLE `flw_ext_instance`
`id` bigint NOT NULL COMMENT '主键ID',
`tenant_id` varchar(50) COMMENT '租户ID',
`process_id` bigint NOT NULL COMMENT '流程定义ID',
`process_name` varchar(100) COMMENT '流程名称',
`process_type` varchar(100) COMMENT '流程类型',
`model_content` text COMMENT '流程模型定义JSON内容',
PRIMARY KEY (`id`) USING BTREE,
Expand Down
2 changes: 2 additions & 0 deletions db/flowlong-oracle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CREATE TABLE "flw_ext_instance" (
"id" NUMBER(20,0) NOT NULL,
"tenant_id" NVARCHAR2(50),
"process_id" NUMBER(20,0) NOT NULL,
"process_name" NVARCHAR2(100),
"process_type" NVARCHAR2(100),
"model_content" NCLOB
)
Expand All @@ -23,6 +24,7 @@ DISABLE ROW MOVEMENT
COMMENT ON COLUMN "flw_ext_instance"."id" IS '主键ID';
COMMENT ON COLUMN "flw_ext_instance"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "flw_ext_instance"."process_id" IS '流程定义ID';
COMMENT ON COLUMN "flw_ext_instance"."process_name" IS '流程名称';
COMMENT ON COLUMN "flw_ext_instance"."process_type" IS '流程类型';
COMMENT ON COLUMN "flw_ext_instance"."model_content" IS '流程模型定义JSON内容';
COMMENT ON TABLE "flw_ext_instance" IS '扩展流程实例表';
Expand Down
2 changes: 2 additions & 0 deletions db/flowlong-postgresql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,15 @@ CREATE TABLE "public"."flw_ext_instance" (
"id" int8 NOT NULL,
"tenant_id" varchar(50) COLLATE "pg_catalog"."default",
"process_id" int8 NOT NULL,
"process_name" varchar(100) COLLATE "pg_catalog"."default",
"process_type" varchar(100) COLLATE "pg_catalog"."default",
"model_content" text COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."flw_ext_instance"."id" IS '主键ID';
COMMENT ON COLUMN "public"."flw_ext_instance"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "public"."flw_ext_instance"."process_id" IS '流程定义ID';
COMMENT ON COLUMN "public"."flw_ext_instance"."process_name" IS '流程名称';
COMMENT ON COLUMN "public"."flw_ext_instance"."process_type" IS '流程类型';
COMMENT ON COLUMN "public"."flw_ext_instance"."model_content" IS '流程模型定义JSON内容';
COMMENT ON TABLE "public"."flw_ext_instance" IS '扩展流程实例表';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public class FlwExtInstance implements ProcessModelCache, Serializable {
* 流程定义ID
*/
private Long processId;
/**
* 流程定义名称(冗余业务直接可用)
*/
protected String processName;
/**
* 流程定义类型(冗余业务直接可用)
*/
Expand All @@ -54,6 +58,7 @@ public static FlwExtInstance of(FlwInstance flwInstance, FlwProcess flwProcess)
ext.id = flwInstance.getId();
ext.tenantId = flwInstance.getTenantId();
ext.processId = flwInstance.getProcessId();
ext.processName = flwProcess.getProcessName();
ext.processType = flwProcess.getProcessType();
ext.modelContent = flwProcess.getModelContent();
return ext;
Expand Down

0 comments on commit 8ebd407

Please sign in to comment.