wangzhibo
2026-07-28 920cec41cedfde27f89d7c19b78e03147b926ab5
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
import { BaseEntity, transformerJson } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';
 
/**
 * 插件信息
 */
@Entity('plugin_info')
export class PluginInfoEntity extends BaseEntity {
  @Column({ comment: '名称' })
  name: string;
 
  @Column({ comment: '简介' })
  description: string;
 
  @Index()
  @Column({ comment: 'Key名' })
  keyName: string;
 
  @Column({ comment: 'Hook' })
  hook: string;
 
  @Column({ comment: '描述', type: 'text' })
  readme: string;
 
  @Column({ comment: '版本' })
  version: string;
 
  @Column({ comment: 'Logo(base64)', type: 'text', nullable: true })
  logo: string;
 
  @Column({ comment: '作者' })
  author: string;
 
  @Column({ comment: '状态 0-禁用 1-启用', default: 0 })
  status: number;
 
  @Column({ comment: '内容', type: 'json', transformer: transformerJson })
  content: {
    type: 'comm' | 'module';
    data: string;
  };
 
  @Column({ comment: 'ts内容', type: 'json', transformer: transformerJson })
  tsContent: {
    type: 'ts';
    data: string;
  };
 
  @Column({
    comment: '插件的plugin.json',
    type: 'json',
    transformer: transformerJson,
    nullable: true,
  })
  pluginJson: any;
 
  @Column({
    comment: '配置',
    type: 'json',
    transformer: transformerJson,
    nullable: true,
  })
  config: any;
}