Skip to content

Commit

Permalink
feature: add type and config id
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Jan 11, 2025
1 parent 6fc0a04 commit 5352d1f
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ public class CarpDagOrcaPipeline extends BaseAuditDO {
@TableField("namespace")
private String namespace;

@TableField("`type`")
private String type;

@TableField("config_id")
private String configId;

@TableField("`name`")
private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public class CarpDagOrcaPipelineDTO extends BaseDTO {
@Schema(description = "namespace")
private String namespace;

@Schema(description = "type")
private String type;

@Schema(description = "pipeline config id. only for pipeline")
private String configId;

@Schema(description = "name")
private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public PageResult<CarpDagOrcaPipelineDTO> page(CarpDagOrcaPipelinePageParam para
Page<CarpDagOrcaPipeline> page = PageUtil.buildPageParam(param);
LambdaQueryWrapper<CarpDagOrcaPipeline> queryChainWrapper = Wrappers.lambdaQuery(CarpDagOrcaPipeline.class)
.eq(CarpDagOrcaPipeline::getNamespace, param.getNamespace())
.eq(StringUtils.hasText(param.getType()), CarpDagOrcaPipeline::getType, param.getType())
.eq(StringUtils.hasText(param.getConfigId()), CarpDagOrcaPipeline::getConfigId, param.getConfigId())
.like(StringUtils.hasText(param.getName()), CarpDagOrcaPipeline::getName, param.getName())
.eq(StringUtils.hasText(param.getStatus()), CarpDagOrcaPipeline::getStatus, param.getStatus());

Expand All @@ -72,6 +74,8 @@ public PageResult<CarpDagOrcaPipelineDTO> page(CarpDagOrcaPipelinePageParam para
public List<CarpDagOrcaPipelineDTO> listAll(CarpDagOrcaPipelinePageParam param) {
LambdaQueryWrapper<CarpDagOrcaPipeline> queryChainWrapper = Wrappers.lambdaQuery(CarpDagOrcaPipeline.class)
.eq(CarpDagOrcaPipeline::getNamespace, param.getNamespace())
.eq(StringUtils.hasText(param.getType()), CarpDagOrcaPipeline::getType, param.getType())
.eq(StringUtils.hasText(param.getConfigId()), CarpDagOrcaPipeline::getConfigId, param.getConfigId())
.like(StringUtils.hasText(param.getName()), CarpDagOrcaPipeline::getName, param.getName())
.eq(StringUtils.hasText(param.getStatus()), CarpDagOrcaPipeline::getStatus, param.getStatus());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ public class CarpDagOrcaPipelineAddParam {
@Schema(description = "namespace")
private String namespace;

@NotBlank
@Schema(description = "type")
private String type;

@Schema(description = "pipeline config id. only for pipeline")
private String configId;

@NotBlank
@Schema(description = "name")
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public class CarpDagOrcaPipelinePageParam extends PageParam {
@Schema(description = "namespace")
private String namespace;

@Schema(description = "type")
private String type;

@Schema(description = "pipeline config id")
private String configId;

@Schema(description = "name")
private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ public class CarpDagOrcaPipelineUpdateParam {
@Schema(description = "namespace")
private String namespace;

@NotBlank
@Schema(description = "type")
private String type;

@Schema(description = "pipeline config id. only for pipeline")
private String configId;

@NotBlank
@Schema(description = "name")
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<result column="editor" property="editor"/>
<result column="update_time" property="updateTime"/>
<result column="namespace" property="namespace"/>
<result column="type" property="type"/>
<result column="config_id" property="configId"/>
<result column="name" property="name"/>
<result column="status" property="status"/>
<result column="build_time" property="buildTime"/>
Expand All @@ -48,6 +50,6 @@
create_time,
editor,
update_time,
namespace, `name`, `status`, build_time, start_time, end_time, canceled, body, remark
namespace, `type`, config_id, `name`, `status`, build_time, start_time, end_time, canceled, body, remark
</sql>
</mapper>
2 changes: 2 additions & 0 deletions tools/docker/mysql/init.d/carp-dag.sql
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ create table `carp_dag_orca_pipeline`
(
`id` bigint not null auto_increment comment '自增主键',
`namespace` varchar(255) not null,
`type` varchar(32) not null comment 'pipeline or orchestration.',
`config_id` varchar(32) comment 'config id. only for pipeline',
`name` varchar(255) not null,
`status` enum('NOT_STARTED','BUFFERED','RUNNING','PAUSED','SUSPENDED','SUCCEEDED','FAILED_CONTINUE','TERMINAL','CANCELED','REDIRECT','STOPPED','SKIPPED') not null default 'NOT_STARTED',
`build_time` bigint not null,
Expand Down

0 comments on commit 5352d1f

Please sign in to comment.