mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
* db entities don't need an ID before they are inserted * don't define constructors on entity classes, use repository.create instead * use mixins to reduce duplicate code in db entity classes
15 lines
271 B
TypeScript
15 lines
271 B
TypeScript
import { Column, Entity } from 'typeorm';
|
|
import { WithStringId } from './AbstractEntity';
|
|
|
|
@Entity()
|
|
export class Variables extends WithStringId {
|
|
@Column('text')
|
|
key: string;
|
|
|
|
@Column('text', { default: 'string' })
|
|
type: string;
|
|
|
|
@Column('text')
|
|
value: string;
|
|
}
|