mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
29 lines
833 B
TypeScript
29 lines
833 B
TypeScript
import { ProjectIcon, ProjectType } from '@n8n/api-types';
|
|
import { WithTimestampsAndStringId } from '@n8n/db';
|
|
import { Column, Entity, OneToMany } from '@n8n/typeorm';
|
|
|
|
import type { ProjectRelation } from './project-relation';
|
|
import type { SharedCredentials } from './shared-credentials';
|
|
import type { SharedWorkflow } from './shared-workflow';
|
|
|
|
@Entity()
|
|
export class Project extends WithTimestampsAndStringId {
|
|
@Column({ length: 255 })
|
|
name: string;
|
|
|
|
@Column({ type: 'varchar', length: 36 })
|
|
type: ProjectType;
|
|
|
|
@Column({ type: 'json', nullable: true })
|
|
icon: ProjectIcon;
|
|
|
|
@OneToMany('ProjectRelation', 'project')
|
|
projectRelations: ProjectRelation[];
|
|
|
|
@OneToMany('SharedCredentials', 'project')
|
|
sharedCredentials: SharedCredentials[];
|
|
|
|
@OneToMany('SharedWorkflow', 'project')
|
|
sharedWorkflows: SharedWorkflow[];
|
|
}
|