feat: Implement draft version of Step model

This commit is contained in:
Faruk AYDIN
2021-11-06 23:38:37 +01:00
committed by Ömer Faruk Aydın
parent a3dd76df21
commit c48c905805
5 changed files with 118 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
import Base from './base'
enum StepEnumType {
'trigger',
'action',
}
class Step extends Base {
id!: number
key!: string
appKey!: string
type!: StepEnumType
connectionId!: number
parameters: any
static tableName = 'steps';
static jsonSchema = {
type: 'object',
required: ['key', 'appKey', 'type', 'connectionId'],
properties: {
id: { type: 'integer' },
key: { type: 'string', minLength: 1, maxLength: 255 },
appKey: { type: 'string', minLength: 1, maxLength: 255 },
type: { type: "string", enum: ["action", "trigger"] },
connectionId: { type: 'integer' },
parameters: { type: 'object' },
}
}
}
export default Step;