members-database/entities/memberQualifications.ts

25 lines
657 B
TypeScript

import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { member } from "./member";
import { qualification } from "./qualification";
@Entity()
export class memberQualifications {
@PrimaryColumn({ generated: "increment", type: "int" })
id: number;
@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;
}