mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
45 lines
563 B
TypeScript
45 lines
563 B
TypeScript
|
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({
|
||
|
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;
|
||
|
}
|