18 lines
430 B
TypeScript
18 lines
430 B
TypeScript
import { Column, Entity, ManyToMany, PrimaryGeneratedColumn } from "typeorm";
|
|
import { Query } from "./query.entity";
|
|
|
|
@Entity("module")
|
|
export class VMModule {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column({ type: "varchar", length: 255, nullable: false })
|
|
sourcePath: string;
|
|
|
|
@Column({ type: "varchar", length: 255 })
|
|
name: string;
|
|
|
|
@ManyToMany(() => Query, (query) => query.modules)
|
|
queries: Query[];
|
|
}
|