mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(core): Move interrelated entities to @n8n/db (#15050)
This commit is contained in:
26
packages/@n8n/db/src/entities/workflow-statistics.ts
Normal file
26
packages/@n8n/db/src/entities/workflow-statistics.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Column, Entity, ManyToOne, PrimaryColumn } from '@n8n/typeorm';
|
||||
|
||||
import { DateTimeColumn } from './abstract-entity';
|
||||
import { StatisticsNames } from './types-db';
|
||||
import { WorkflowEntity } from './workflow-entity';
|
||||
|
||||
@Entity()
|
||||
export class WorkflowStatistics {
|
||||
@Column()
|
||||
count: number;
|
||||
|
||||
@Column()
|
||||
rootCount: number;
|
||||
|
||||
@DateTimeColumn()
|
||||
latestEvent: Date;
|
||||
|
||||
@PrimaryColumn({ length: 128 })
|
||||
name: StatisticsNames;
|
||||
|
||||
@ManyToOne('WorkflowEntity', 'shared')
|
||||
workflow: WorkflowEntity;
|
||||
|
||||
@PrimaryColumn()
|
||||
workflowId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user