mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
ci: Break most of the circular dependencies in code (no-changelog) (#4990)
This commit is contained in:
committed by
GitHub
parent
82f763589b
commit
5db9c46043
@@ -1,21 +1,21 @@
|
||||
import { Entity, ManyToOne, RelationId } from 'typeorm';
|
||||
import { CredentialsEntity } from './CredentialsEntity';
|
||||
import { User } from './User';
|
||||
import { Role } from './Role';
|
||||
import type { CredentialsEntity } from './CredentialsEntity';
|
||||
import type { User } from './User';
|
||||
import type { Role } from './Role';
|
||||
import { AbstractEntity } from './AbstractEntity';
|
||||
|
||||
@Entity()
|
||||
export class SharedCredentials extends AbstractEntity {
|
||||
@ManyToOne(() => Role, (role) => role.sharedCredentials, { nullable: false })
|
||||
@ManyToOne('Role', 'sharedCredentials', { nullable: false })
|
||||
role: Role;
|
||||
|
||||
@ManyToOne(() => User, (user) => user.sharedCredentials, { primary: true })
|
||||
@ManyToOne('User', 'sharedCredentials', { primary: true })
|
||||
user: User;
|
||||
|
||||
@RelationId((sharedCredential: SharedCredentials) => sharedCredential.user)
|
||||
userId: string;
|
||||
|
||||
@ManyToOne(() => CredentialsEntity, (credentials) => credentials.shared, {
|
||||
@ManyToOne('CredentialsEntity', 'shared', {
|
||||
primary: true,
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user