2020-02-10 08:09:06 -08:00
|
|
|
import {
|
|
|
|
ICredentialNodeAccess,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
import {
|
|
|
|
ICredentialsDb,
|
|
|
|
} from '../../';
|
|
|
|
|
|
|
|
import {
|
|
|
|
Column,
|
|
|
|
Entity,
|
|
|
|
Index,
|
|
|
|
PrimaryGeneratedColumn,
|
|
|
|
} from 'typeorm';
|
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class CredentialsEntity implements ICredentialsDb {
|
|
|
|
|
|
|
|
@PrimaryGeneratedColumn()
|
|
|
|
id: number;
|
|
|
|
|
|
|
|
@Column({
|
2020-10-22 06:46:03 -07:00
|
|
|
length: 128,
|
2020-02-10 08:09:06 -08:00
|
|
|
})
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
@Column('text')
|
|
|
|
data: string;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column({
|
2020-10-22 06:46:03 -07:00
|
|
|
length: 32,
|
2020-02-10 08:09:06 -08:00
|
|
|
})
|
|
|
|
type: string;
|
|
|
|
|
|
|
|
@Column('json')
|
|
|
|
nodesAccess: ICredentialNodeAccess[];
|
|
|
|
|
2020-02-10 09:43:21 -08:00
|
|
|
@Column('datetime')
|
2020-02-10 08:09:06 -08:00
|
|
|
createdAt: Date;
|
|
|
|
|
2020-02-10 09:43:21 -08:00
|
|
|
@Column('datetime')
|
2020-02-10 08:09:06 -08:00
|
|
|
updatedAt: Date;
|
|
|
|
}
|