2019-07-22 11:29:06 -07:00
|
|
|
import {
|
|
|
|
ICredentialNodeAccess,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
import {
|
|
|
|
ICredentialsDb,
|
|
|
|
} from '../../';
|
|
|
|
|
|
|
|
import {
|
|
|
|
Column,
|
|
|
|
Entity,
|
|
|
|
Index,
|
|
|
|
PrimaryGeneratedColumn,
|
2019-09-19 05:14:37 -07:00
|
|
|
} from 'typeorm';
|
2019-07-22 11:29:06 -07:00
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class CredentialsEntity implements ICredentialsDb {
|
|
|
|
|
|
|
|
@PrimaryGeneratedColumn()
|
|
|
|
id: number;
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
length: 128
|
|
|
|
})
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
@Column('text')
|
|
|
|
data: string;
|
|
|
|
|
|
|
|
@Index()
|
|
|
|
@Column({
|
|
|
|
length: 32
|
|
|
|
})
|
|
|
|
type: string;
|
|
|
|
|
|
|
|
@Column('json')
|
|
|
|
nodesAccess: ICredentialNodeAccess[];
|
|
|
|
|
|
|
|
@Column('timestamp')
|
|
|
|
createdAt: Date;
|
|
|
|
|
|
|
|
@Column('timestamp')
|
|
|
|
updatedAt: Date;
|
2020-04-29 02:34:12 -07:00
|
|
|
|
2019-07-22 11:29:06 -07:00
|
|
|
}
|