refactor(core): Port over project request payloads to DTOs (#12528)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-01-09 13:47:23 +01:00
committed by GitHub
parent 44679b42aa
commit 5f1adefca7
34 changed files with 514 additions and 194 deletions

View File

@@ -1,3 +1,4 @@
import { ProjectIcon, ProjectType } from '@n8n/api-types';
import { Column, Entity, OneToMany } from '@n8n/typeorm';
import { WithTimestampsAndStringId } from './abstract-entity';
@@ -5,15 +6,12 @@ import type { ProjectRelation } from './project-relation';
import type { SharedCredentials } from './shared-credentials';
import type { SharedWorkflow } from './shared-workflow';
export type ProjectType = 'personal' | 'team';
export type ProjectIcon = { type: 'emoji' | 'icon'; value: string } | null;
@Entity()
export class Project extends WithTimestampsAndStringId {
@Column({ length: 255 })
name: string;
@Column({ length: 36 })
@Column({ type: 'varchar', length: 36 })
type: ProjectType;
@Column({ type: 'json', nullable: true })