n8n/packages/cli/src/databases/entities/WebhookEntity.ts
कारतोफ्फेलस्क्रिप्ट™ 5eebd91ba7
fix(API): reduce code duplication between DB entities (#4351)
2022-10-21 12:29:25 +02:00

26 lines
459 B
TypeScript

import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
import { IWebhookDb } from '../../Interfaces';
@Entity()
@Index(['webhookId', 'method', 'pathLength'])
export class WebhookEntity implements IWebhookDb {
@Column()
workflowId: number;
@PrimaryColumn()
webhookPath: string;
@PrimaryColumn()
method: string;
@Column()
node: string;
@Column({ nullable: true })
webhookId: string;
@Column({ nullable: true })
pathLength: number;
}