mirror of
https://github.com/immich-app/immich.git
synced 2026-05-21 23:26:31 -04:00
3d075f2bf8
feat: plugins chore: better types feat: plugins
27 lines
879 B
TypeScript
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;
|
|
}
|