package cd.casic.ci.process.process.dataObject.template;

import cd.casic.ci.process.process.dataObject.base.PipBaseElement;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import java.util.Map;

/**
 * @author HopeLi
 * @version v1.0
 * @ClassName TemplateManager
 * @Date: 2025/5/28 19:02
 * @Description:
 */

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(autoResultMap = true)
public class TemplateTask extends PipBaseElement {
    /**
     * 阶段ID
     */
    private String stageId;

    /**
     * 任务名称
     */
    private String taskName;

    /**
     * 流水线模板ID
     */
    private String templateId;

    /**
     * 任务类型
     */
    private String taskType;

    /**
     * 任务排序
     */
    private Integer taskSort;

    /**
     * 后置处理器ID
     */
    private String postprocessId;

    /**
     * 任务配置（JSON格式存储）
     */
    @TableField(typeHandler = JacksonTypeHandler.class,jdbcType = JdbcType.VARCHAR)
    private Map<String, Object> taskProperties;
}
