members-database/entities/qualification.ts

20 lines
593 B
TypeScript
Raw Normal View History

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