Files
n8n_Demo/n8n-n8n-1.109.2/packages/@n8n/db/src/entities/shared-workflow.ts

25 lines
604 B
TypeScript
Raw Normal View History

2025-09-08 04:48:28 +08:00
import { WorkflowSharingRole } from '@n8n/permissions';
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
import { WithTimestamps } from './abstract-entity';
import { Project } from './project';
import { WorkflowEntity } from './workflow-entity';
@Entity()
export class SharedWorkflow extends WithTimestamps {
@Column({ type: 'varchar' })
role: WorkflowSharingRole;
@ManyToOne('WorkflowEntity', 'shared')
workflow: WorkflowEntity;
@PrimaryColumn()
workflowId: string;
@ManyToOne('Project', 'sharedWorkflows')
project: Project;
@PrimaryColumn()
projectId: string;
}