2026-05-31 01:41:33 +08:00
|
|
|
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
2024-10-13 01:27:08 +08:00
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Entity("pi_plugin")
|
2024-10-13 01:27:08 +08:00
|
|
|
export class PluginEntity {
|
|
|
|
|
@PrimaryGeneratedColumn()
|
|
|
|
|
id: number;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ name: "name", comment: "Key" })
|
2024-10-13 01:27:08 +08:00
|
|
|
name: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ name: "icon", comment: "图标" })
|
2024-10-13 01:27:08 +08:00
|
|
|
icon: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ name: "title", comment: "标题" })
|
2024-10-13 01:27:08 +08:00
|
|
|
title: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ name: "group", comment: "分组" })
|
2024-10-13 01:27:08 +08:00
|
|
|
group: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ name: "desc", comment: "描述" })
|
2024-10-13 01:27:08 +08:00
|
|
|
desc: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "配置", length: 40960 })
|
2024-10-13 01:27:08 +08:00
|
|
|
setting: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ name: "sys_setting", comment: "系统配置", length: 40960 })
|
2024-10-13 01:27:08 +08:00
|
|
|
sysSetting: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "脚本", length: 40960 })
|
2024-10-13 01:27:08 +08:00
|
|
|
content: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "类型", length: 100, nullable: true })
|
2025-04-01 22:34:15 +08:00
|
|
|
type: string; // builtIn | local | download
|
2024-10-13 01:27:08 +08:00
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "启用/禁用", default: false })
|
2024-10-13 01:27:08 +08:00
|
|
|
disabled: boolean;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "版本", length: 100, nullable: true })
|
2025-04-01 22:34:15 +08:00
|
|
|
version: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "插件类型", length: 100, nullable: true })
|
2025-04-01 22:34:15 +08:00
|
|
|
pluginType: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "元数据", length: 40960, nullable: true })
|
2025-04-01 22:34:15 +08:00
|
|
|
metadata: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "额外配置", length: 40960, nullable: true })
|
2025-04-11 14:00:28 +08:00
|
|
|
extra: string;
|
|
|
|
|
|
2026-05-31 01:41:33 +08:00
|
|
|
@Column({ comment: "作者", length: 100, nullable: true })
|
2025-04-01 22:34:15 +08:00
|
|
|
author: string;
|
|
|
|
|
|
2024-10-13 01:27:08 +08:00
|
|
|
@Column({
|
2026-05-31 01:41:33 +08:00
|
|
|
name: "create_time",
|
|
|
|
|
comment: "创建时间",
|
|
|
|
|
default: () => "CURRENT_TIMESTAMP",
|
2024-10-13 01:27:08 +08:00
|
|
|
})
|
|
|
|
|
createTime: Date;
|
|
|
|
|
@Column({
|
2026-05-31 01:41:33 +08:00
|
|
|
name: "update_time",
|
|
|
|
|
comment: "修改时间",
|
|
|
|
|
default: () => "CURRENT_TIMESTAMP",
|
2024-10-13 01:27:08 +08:00
|
|
|
})
|
|
|
|
|
updateTime: Date;
|
|
|
|
|
}
|