package com.ruoyi.interfaces.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * entity:MdModelStep
 *
 * @author lql
 * @date 2025-7-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName
public class MdModelStep implements Serializable {
    public enum StepType {API, TRANSFORM, CONDITION, WAIT, DB}

    public enum ErrorPolicy {ABORT, IGNORE, RETRY}

    @TableId
    private Long id;
    @ApiModelProperty("工作流ID")
    private Long workflowId;
    @ApiModelProperty("步骤名称")
    private String name;
    @ApiModelProperty("步骤类型")
    private StepType type;
    @ApiModelProperty("步骤配置(JSON格式)")
    private String config;
    @ApiModelProperty("执行顺序")
    private Integer sequence;
    private ErrorPolicy errorPolicy;
    @ApiModelProperty("重试次数")
    private Integer retryCount;
    @ApiModelProperty("输出映射(JSON格式)")
    private String outputMapping;

}
