Files
immich/server/src/schema/tables/workflow-step.table.ts
T
Jason Rasmussen 3d075f2bf8 feat: workflows & plugins (#26727)
feat: plugins

chore: better types

feat: plugins
2026-05-18 11:09:33 -04:00

27 lines
879 B
TypeScript

import { WorkflowStepConfig } from '@immich/plugin-sdk';
import { Column, ForeignKeyColumn, PrimaryGeneratedColumn, Table } from '@immich/sql-tools';
import { Generated } from 'kysely';
import { PluginMethodTable } from 'src/schema/tables/plugin-method.table';
import { WorkflowTable } from 'src/schema/tables/workflow.table';
@Table('workflow_step')
export class WorkflowStepTable {
@PrimaryGeneratedColumn('uuid')
id!: Generated<string>;
@Column({ type: 'boolean', default: true })
enabled!: boolean;
@ForeignKeyColumn(() => WorkflowTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
workflowId!: string;
@ForeignKeyColumn(() => PluginMethodTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
pluginMethodId!: string;
@Column({ type: 'jsonb', nullable: true })
config!: WorkflowStepConfig | null;
@Column({ type: 'integer' })
order!: number;
}