mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-09-27 04:01:44 +02:00
31 lines
918 B
TypeScript
31 lines
918 B
TypeScript
import { Column, Entity, OneToMany } from '@n8n/typeorm';
|
|
|
|
import { WithTimestampsAndStringId } from './abstract-entity';
|
|
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: 'personal' | 'team';
|
|
|
|
@Column({ type: 'json', nullable: true })
|
|
icon: { type: 'emoji' | 'icon'; value: string } | null;
|
|
|
|
@Column({ type: 'varchar', length: 512, nullable: true })
|
|
description: string | null;
|
|
|
|
@OneToMany('ProjectRelation', 'project')
|
|
projectRelations: ProjectRelation[];
|
|
|
|
@OneToMany('SharedCredentials', 'project')
|
|
sharedCredentials: SharedCredentials[];
|
|
|
|
@OneToMany('SharedWorkflow', 'project')
|
|
sharedWorkflows: SharedWorkflow[];
|
|
}
|