Refactor code structure for improved readability and maintainability
This commit is contained in:
20
src/query/entities/module.entity.ts
Normal file
20
src/query/entities/module.entity.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { Column, Entity, ManyToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Query } from "./query.enitity";
|
||||
|
||||
@Entity("module")
|
||||
export class Module {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: false })
|
||||
sourcePath: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
name: string;
|
||||
|
||||
@Column({ type: "tinyint", default: 1 })
|
||||
isInjectable: number;
|
||||
|
||||
@ManyToMany(() => Query, (query) => query.modules)
|
||||
queries: Query[];
|
||||
}
|
||||
Reference in New Issue
Block a user