import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm"; import { member } from "./member"; import { qualification } from "./qualification"; @Entity() export class member_qualifications { @PrimaryColumn({ generated: "increment", type: "int" }) id: number; @Column({ type: "boolean", default: true }) given: boolean; @Column({ type: "varchar", length: 255, nullable: true, default: null }) note?: string; @Column({ type: "date" }) date: Date; @ManyToOne(() => member, (member) => member.awards, { onDelete: "RESTRICT", }) member: member; @ManyToOne(() => qualification, (qualification) => qualification.members, { onDelete: "RESTRICT", }) qualification: qualification; }