21 lines
499 B
TypeScript
21 lines
499 B
TypeScript
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
|
import { Query } from "./query.entity";
|
|
|
|
@Entity("plugin")
|
|
export class VmPlugin {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column({ type: "varchar", length: 255, nullable: false })
|
|
class: string;
|
|
|
|
@Column({ type: "varchar", length: 255, nullable: false })
|
|
name: string;
|
|
|
|
@ManyToOne(() => Query, (query) => query.plugins)
|
|
query: Query;
|
|
|
|
@Column({ type: "varchar", length: 255 })
|
|
config: string;
|
|
}
|