feat: Implement getStepWithTestExecutions query

This commit is contained in:
Faruk AYDIN
2022-02-22 02:04:12 +03:00
committed by Ali BARIN
parent 98864ceadd
commit d139eb8c06
9 changed files with 112 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import Base from './base';
import Flow from './flow';
import Connection from './connection';
import ExecutionStep from './execution-step';
enum StepEnumType {
'trigger',
@@ -19,6 +20,7 @@ class Step extends Base {
parameters: string;
connection?: Connection;
flow?: Flow;
executionSteps?: [ExecutionStep];
static tableName = 'steps';
@@ -56,6 +58,14 @@ class Step extends Base {
to: 'connections.id',
},
},
executionSteps: {
relation: Base.HasManyRelation,
modelClass: ExecutionStep,
join: {
from: 'steps.id',
to: 'execution_steps.step_id',
},
},
});
}