Commit 23a11fc2 authored by chenshouchao's avatar chenshouchao

feat: 任务配置数据结构完成

parent 46812651
export interface ITemplateConfig {
title: string;
version: string;
updateTime: string;
description: string;
language: string;
languageVersion: string;
tags: Array<string>;
source: string;
productId: string;
tasks: Array<ITask>;
}
export interface ITask {
id: string;
title: string;
description: string;
position: {
x: number;
y: number;
};
type: "batch" | "flow";
parameters: Array<IParameter>;
edges: Array<IEdge>;
}
export interface IParameter {
hidden: boolean;
name: string;
required: boolean;
domType: IDomType;
dataType: string;
value: string;
description: string;
validators: IValidator;
choices: Array<IChoice>;
}
export enum IDomType {
PathSelect = "pathSelect",
DatasetSelect = "datasetSelect",
FileSelect = "fileSelect",
Input = "input",
Select = "select",
MultipleSelect = "multipleSelect",
Radio = "radio",
Checkbox = "checkbox",
}
export interface IValidator {
// 待定
}
export interface IChoice {
key: string;
value: boolean | string | number;
}
export interface IEdge {
id: string;
source: string;
sourceHandleid: string;
target: string;
targetHandle: string;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment