forked from ToolJet/ToolJet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.entity.ts
More file actions
67 lines (51 loc) · 1.41 KB
/
plugin.entity.ts
File metadata and controls
67 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import {
Column,
CreateDateColumn,
Entity,
JoinColumn,
OneToOne,
PrimaryGeneratedColumn,
UpdateDateColumn,
Unique
} from 'typeorm';
import { File } from 'src/entities/file.entity';
@Unique(['pluginId'])
@Entity({ name: 'plugins' })
export class Plugin {
@PrimaryGeneratedColumn()
public id: string;
@Column({ name: 'plugin_id' })
pluginId: string;
@Column({ name: 'name' })
name: string;
@Column({ name: 'repo' })
repo: string;
@Column({ name: 'version' })
version: string;
@Column({ name: 'description' })
description: string;
@Column({ name: 'index_file_id' })
indexFileId: string;
@Column({ name: 'operations_file_id' })
operationsFileId: string;
@Column({ name: 'icon_file_id' })
iconFileId: string;
@Column({ name: 'manifest_file_id' })
manifestFileId: string;
@CreateDateColumn({ default: () => 'now()', name: 'created_at' })
createdAt: Date;
@UpdateDateColumn({ default: () => 'now()', name: 'updated_at' })
updatedAt: Date;
@OneToOne(() => File, (file) => file.id)
@JoinColumn({ name: 'index_file_id' })
indexFile?: File;
@OneToOne(() => File, (file) => file.id)
@JoinColumn({ name: 'operations_file_id' })
operationsFile?: File;
@OneToOne(() => File, (file) => file.id)
@JoinColumn({ name: 'icon_file_id' })
iconFile?: File;
@OneToOne(() => File, (file) => file.id)
@JoinColumn({ name: 'manifest_file_id' })
manifestFile?: File;
}