- add timeoutSeconds field to scenario and step entities - add timeoutSeconds to create/update DTOs for scenario and step - enforce timeout via scheduler: abort run if step exceeds limit - expose timeoutSeconds in MCP create/update scenario and step tools - add client-side type, API, i18n, and form support for timeoutSeconds - add integration tests for timeout persistence via REST and MCP
44 lines
854 B
TypeScript
44 lines
854 B
TypeScript
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
JoinColumn,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from "typeorm";
|
|
import { ScenarioEntity } from "./scenario.entity";
|
|
|
|
@Entity("scenario_steps")
|
|
export class ScenarioStepEntity {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column("text")
|
|
scenarioId: string;
|
|
|
|
@ManyToOne(() => ScenarioEntity, (scenario) => scenario.steps, {
|
|
onDelete: "CASCADE",
|
|
})
|
|
@JoinColumn({ name: "scenarioId" })
|
|
scenario: ScenarioEntity;
|
|
|
|
@Column({ default: 0 })
|
|
order: number;
|
|
|
|
@Column({ type: "text", nullable: true })
|
|
title: string | null;
|
|
|
|
@Column({ type: "text", nullable: true })
|
|
execCode: string | null;
|
|
|
|
@Column({ type: "int", nullable: true })
|
|
timeoutSeconds: number | null;
|
|
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt: Date;
|
|
}
|