mirror of
https://github.com/immich-app/immich.git
synced 2026-05-17 13:02:14 -04:00
d7c5406b8b
chore: better types feat: plugins
36 lines
999 B
TypeScript
36 lines
999 B
TypeScript
import { Column, ForeignKeyColumn, Generated, PrimaryGeneratedColumn, Table, Unique } from '@immich/sql-tools';
|
|
import { JsonSchemaDto } from 'src/dtos/json-schema.dto';
|
|
import { WorkflowType } from 'src/enum';
|
|
import { PluginTable } from 'src/schema/tables/plugin.table';
|
|
|
|
@Unique({ columns: ['pluginId', 'name'] })
|
|
@Table('plugin_method')
|
|
export class PluginMethodTable {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id!: Generated<string>;
|
|
|
|
@ForeignKeyColumn(() => PluginTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
|
|
pluginId!: string;
|
|
|
|
@Column()
|
|
name!: string;
|
|
|
|
@Column()
|
|
title!: string;
|
|
|
|
@Column()
|
|
description!: string;
|
|
|
|
@Column({ type: 'character varying', array: true })
|
|
types!: Generated<WorkflowType[]>;
|
|
|
|
@Column({ type: 'boolean', default: false })
|
|
hostFunctions!: Generated<boolean>;
|
|
|
|
@Column({ type: 'jsonb', nullable: true })
|
|
schema!: JsonSchemaDto | null;
|
|
|
|
@Column({ type: 'character varying', default: [], array: true })
|
|
uiHints!: Generated<string[]>;
|
|
}
|