import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm"; import { member_qualifications } from "./member_qualifications"; @Entity() export class qualification { @PrimaryColumn({ generated: "increment", type: "int" }) id: number; @Column({ type: "varchar", length: 255 }) qualification: string; @Column({ type: "varchar", length: 255, nullable: true, default: null }) description?: string; @OneToMany(() => member_qualifications, (member_qualifications) => member_qualifications.qualification, { onDelete: "RESTRICT", }) members: member_qualifications[]; }